Commit a2edaa1111572e4736693d514e8de051c5c720fa
Exists in
master
and in
7 other branches
Merge remote-tracking branch 'origin/master'
Showing 13 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/CommonService.java
- platform-common/src/main/java/com/lyms/platform/common/enums/FetalEnums.java
- platform-common/src/main/java/com/lyms/platform/common/enums/FetalPositionEnums.java
- platform-common/src/main/java/com/lyms/platform/common/enums/JoinEnums.java
- platform-common/src/main/java/com/lyms/platform/common/enums/TaiShuEnums.java
- platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/UnitConstants.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/UnitUtils.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/CommonService.java
View file @
a2edaa1
| ... | ... | @@ -146,8 +146,8 @@ |
| 146 | 146 | if(null!=obj){ |
| 147 | 147 | BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(obj.toString()); |
| 148 | 148 | if(null!=basicConfig){ |
| 149 | - if(null!=basicConfig.getScore()){ | |
| 150 | - score += basicConfig.getScore(); | |
| 149 | + if(null!=basicConfig.getCode()){ | |
| 150 | + score += Integer.valueOf(basicConfig.getCode()); | |
| 151 | 151 | } |
| 152 | 152 | basicConfig = basicConfigService.getOneBasicConfigById(basicConfig.getParentId()); |
| 153 | 153 | if (null != basicConfig && !levelList.contains(basicConfig.getId())) { |
platform-common/src/main/java/com/lyms/platform/common/enums/FetalEnums.java
View file @
a2edaa1
| 1 | 1 | package com.lyms.platform.common.enums; |
| 2 | 2 | |
| 3 | +import org.apache.commons.lang.StringUtils; | |
| 4 | + | |
| 3 | 5 | /** |
| 4 | 6 | * 胎先露 |
| 5 | 7 | * |
| ... | ... | @@ -10,6 +12,18 @@ |
| 10 | 12 | B("臀","2"), |
| 11 | 13 | C("足","3"), |
| 12 | 14 | D("肩","4"); |
| 15 | + | |
| 16 | + public static String getTitle(String id){ | |
| 17 | + if (StringUtils.isNotEmpty(id)){ | |
| 18 | + for (FetalEnums fetalEnums:FetalEnums.values()){ | |
| 19 | + if (fetalEnums.getId().equals(id)){ | |
| 20 | + return fetalEnums.getName(); | |
| 21 | + } | |
| 22 | + } | |
| 23 | + } | |
| 24 | + return null; | |
| 25 | + } | |
| 26 | + | |
| 13 | 27 | private FetalEnums(String name,String id){ |
| 14 | 28 | this.name=name; |
| 15 | 29 | this.id=id; |
platform-common/src/main/java/com/lyms/platform/common/enums/FetalPositionEnums.java
View file @
a2edaa1
| 1 | 1 | package com.lyms.platform.common.enums; |
| 2 | 2 | |
| 3 | +import org.apache.commons.lang.StringUtils; | |
| 4 | + | |
| 3 | 5 | /** |
| 4 | 6 | * |
| 5 | 7 | * 胎方位枚举 |
| ... | ... | @@ -31,6 +33,18 @@ |
| 31 | 33 | ONE21("左肩后","21"), |
| 32 | 34 | ONE22("右肩前","22"), |
| 33 | 35 | ONE23("右肩后","23"); |
| 36 | + | |
| 37 | + public static String getTitle(String id){ | |
| 38 | + if (StringUtils.isNotEmpty(id)){ | |
| 39 | + for (FetalPositionEnums fetalPositionEnums:FetalPositionEnums.values()){ | |
| 40 | + if (fetalPositionEnums.getId().equals(id)){ | |
| 41 | + return fetalPositionEnums.getName(); | |
| 42 | + } | |
| 43 | + } | |
| 44 | + } | |
| 45 | + return null; | |
| 46 | + } | |
| 47 | + | |
| 34 | 48 | |
| 35 | 49 | private FetalPositionEnums(String name,String id){ |
| 36 | 50 | this.name=name; |
platform-common/src/main/java/com/lyms/platform/common/enums/JoinEnums.java
View file @
a2edaa1
| 1 | 1 | package com.lyms.platform.common.enums; |
| 2 | 2 | |
| 3 | +import org.apache.commons.lang.StringUtils; | |
| 4 | + | |
| 3 | 5 | /** |
| 4 | 6 | * 衔接枚举 |
| 5 | 7 | * <p> |
| ... | ... | @@ -9,6 +11,17 @@ |
| 9 | 11 | O("已衔接", "1"), |
| 10 | 12 | O1("未衔接", "2")/*, |
| 11 | 13 | O2("衔接", "3")*/; |
| 14 | + | |
| 15 | + public static String getTitle(String id){ | |
| 16 | + if (StringUtils.isNotEmpty(id)){ | |
| 17 | + for (JoinEnums joinEnums:JoinEnums.values()){ | |
| 18 | + if (joinEnums.getId().equals(id)){ | |
| 19 | + return joinEnums.getName(); | |
| 20 | + } | |
| 21 | + } | |
| 22 | + } | |
| 23 | + return null; | |
| 24 | + } | |
| 12 | 25 | |
| 13 | 26 | private JoinEnums(String name, String id) { |
| 14 | 27 | this.name = name; |
platform-common/src/main/java/com/lyms/platform/common/enums/TaiShuEnums.java
View file @
a2edaa1
| ... | ... | @@ -16,9 +16,11 @@ |
| 16 | 16 | O6("七胎","7"); |
| 17 | 17 | |
| 18 | 18 | public static String getTitle(String id){ |
| 19 | - for(TaiShuEnums enums:values()){ | |
| 20 | - if(enums.getId().equals(id)){ | |
| 21 | - return enums.getName(); | |
| 19 | + if (StringUtils.isNotEmpty(id)){ | |
| 20 | + for(TaiShuEnums enums:values()){ | |
| 21 | + if(enums.getId().equals(id)){ | |
| 22 | + return enums.getName(); | |
| 23 | + } | |
| 22 | 24 | } |
| 23 | 25 | } |
| 24 | 26 | return null; |
platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
View file @
a2edaa1
| ... | ... | @@ -355,17 +355,17 @@ |
| 355 | 355 | if (null != parentId) { |
| 356 | 356 | condition = condition.and("parentId", parentId, MongoOper.IS); |
| 357 | 357 | } |
| 358 | - if (null != cardNo) { | |
| 358 | + if (StringUtils.isNotEmpty( cardNo)) { | |
| 359 | 359 | condition = condition.and("cardNo", cardNo, MongoOper.IS); |
| 360 | 360 | } |
| 361 | - if (null != phone) { | |
| 361 | + if (StringUtils.isNotEmpty(phone)) { | |
| 362 | 362 | condition = condition.and("phone", phone, MongoOper.IS); |
| 363 | 363 | } |
| 364 | 364 | if (null != id) { |
| 365 | 365 | condition = condition.and("id", id, MongoOper.IS); |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | - if (null != name) { | |
| 368 | + if (StringUtils.isNotEmpty(name) ) { | |
| 369 | 369 | condition = condition.and("name", name, MongoOper.IS); |
| 370 | 370 | } |
| 371 | 371 | if (null != NeNullCheckDoctor) { |
| 372 | 372 | |
| ... | ... | @@ -381,10 +381,10 @@ |
| 381 | 381 | if (null != status) { |
| 382 | 382 | condition = condition.and("status", status, MongoOper.IS); |
| 383 | 383 | } |
| 384 | - if (null != cId) { | |
| 384 | + if (StringUtils.isNotEmpty(cId)) { | |
| 385 | 385 | condition = condition.and("checkDoctor", cId, MongoOper.IS); |
| 386 | 386 | } |
| 387 | - if (null != fId) { | |
| 387 | + if (StringUtils.isNotEmpty( fId)) { | |
| 388 | 388 | condition = condition.and("fId", fId, MongoOper.IS); |
| 389 | 389 | } |
| 390 | 390 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
a2edaa1
| ... | ... | @@ -8,7 +8,6 @@ |
| 8 | 8 | import com.lyms.platform.common.base.LoginContext; |
| 9 | 9 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 10 | 10 | import com.lyms.platform.common.result.BaseListResponse; |
| 11 | -import com.lyms.platform.common.result.BaseObjectResponse; | |
| 12 | 11 | import com.lyms.platform.common.result.BaseResponse; |
| 13 | 12 | import com.lyms.platform.common.utils.PropertiesUtils; |
| 14 | 13 | import com.lyms.platform.operate.web.facade.AntExRecordFacade; |
| ... | ... | @@ -18,10 +17,7 @@ |
| 18 | 17 | import org.apache.commons.lang.StringUtils; |
| 19 | 18 | import org.springframework.beans.factory.annotation.Autowired; |
| 20 | 19 | import org.springframework.stereotype.Controller; |
| 21 | -import org.springframework.web.bind.annotation.RequestBody; | |
| 22 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 23 | -import org.springframework.web.bind.annotation.RequestMethod; | |
| 24 | -import org.springframework.web.bind.annotation.ResponseBody; | |
| 20 | +import org.springframework.web.bind.annotation.*; | |
| 25 | 21 | |
| 26 | 22 | import javax.servlet.http.HttpServletRequest; |
| 27 | 23 | import javax.servlet.http.HttpServletResponse; |
| ... | ... | @@ -252,5 +248,26 @@ |
| 252 | 248 | } |
| 253 | 249 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); |
| 254 | 250 | } |
| 251 | + | |
| 252 | + | |
| 253 | + //查询初诊接口 | |
| 254 | + | |
| 255 | + /** | |
| 256 | + * 查询复诊接口 | |
| 257 | + * @param id | |
| 258 | + * @param request | |
| 259 | + * @return | |
| 260 | + */ | |
| 261 | + @RequestMapping(method = RequestMethod.GET, value = "/findAntenatalExamination") | |
| 262 | + @TokenRequired | |
| 263 | + public BaseResponse findAntenatalExamination(@RequestParam("id")String id, | |
| 264 | + HttpServletRequest request){ | |
| 265 | + | |
| 266 | + return antExRecordFacade.findAntenatalExamination(id); | |
| 267 | + } | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 255 | 272 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
View file @
a2edaa1
| ... | ... | @@ -330,7 +330,7 @@ |
| 330 | 330 | |
| 331 | 331 | @RequestMapping(value = "/findMatDeliverData", method = RequestMethod.GET) |
| 332 | 332 | @ResponseBody |
| 333 | -// @TokenRequired | |
| 333 | + @TokenRequired | |
| 334 | 334 | public BaseObjectResponse findMatDeliverData(@RequestParam("id")String id){ |
| 335 | 335 | return matDeliverFacade.findMatDeliverData(id); |
| 336 | 336 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
a2edaa1
| ... | ... | @@ -2,11 +2,12 @@ |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.biz.service.*; |
| 4 | 4 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 5 | -import com.lyms.platform.common.enums.RiskDefaultTypeEnum; | |
| 6 | -import com.lyms.platform.common.enums.YnEnums; | |
| 5 | +import com.lyms.platform.common.enums.*; | |
| 7 | 6 | import com.lyms.platform.common.result.BaseListResponse; |
| 7 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 8 | 8 | import com.lyms.platform.common.result.BaseResponse; |
| 9 | 9 | import com.lyms.platform.common.utils.*; |
| 10 | +import com.lyms.platform.common.utils.StringUtils; | |
| 10 | 11 | import com.lyms.platform.operate.web.request.AntExManagerQueryRequest; |
| 11 | 12 | import com.lyms.platform.operate.web.request.CjStatisticsQueryRequest; |
| 12 | 13 | import com.lyms.platform.operate.web.result.AntExManagerResult; |
| ... | ... | @@ -14,6 +15,9 @@ |
| 14 | 15 | import com.lyms.platform.operate.web.result.CjStatisticsResult; |
| 15 | 16 | import com.lyms.platform.operate.web.result.HighScoreResult; |
| 16 | 17 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
| 18 | +import com.lyms.platform.operate.web.utils.FunvCommonUtil; | |
| 19 | +import com.lyms.platform.operate.web.utils.UnitConstants; | |
| 20 | +import com.lyms.platform.operate.web.utils.UnitUtils; | |
| 17 | 21 | import com.lyms.platform.permission.model.Organization; |
| 18 | 22 | import com.lyms.platform.permission.model.OrganizationQuery; |
| 19 | 23 | import com.lyms.platform.permission.model.Users; |
| 20 | 24 | |
| ... | ... | @@ -22,9 +26,9 @@ |
| 22 | 26 | import com.lyms.platform.pojo.*; |
| 23 | 27 | import com.lyms.platform.query.*; |
| 24 | 28 | import org.apache.commons.collections.CollectionUtils; |
| 29 | +import org.apache.commons.collections.MapUtils; | |
| 25 | 30 | import org.apache.commons.lang.math.NumberUtils; |
| 26 | 31 | import org.springframework.beans.factory.annotation.Autowired; |
| 27 | -import org.springframework.data.domain.Sort; | |
| 28 | 32 | import org.springframework.stereotype.Component; |
| 29 | 33 | |
| 30 | 34 | import javax.servlet.http.HttpServletResponse; |
| ... | ... | @@ -567,5 +571,149 @@ |
| 567 | 571 | } |
| 568 | 572 | |
| 569 | 573 | } |
| 574 | + | |
| 575 | + | |
| 576 | + //查询复诊接口 | |
| 577 | + public BaseObjectResponse findAntenatalExamination(String id){ | |
| 578 | + | |
| 579 | + BaseObjectResponse br = new BaseObjectResponse(); | |
| 580 | + if (org.apache.commons.lang.StringUtils.isEmpty(id)){ | |
| 581 | + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 582 | + br.setErrormsg("id为空"); | |
| 583 | + return br; | |
| 584 | + } | |
| 585 | + | |
| 586 | + AntenatalExaminationModel data = antExService.findOneById(id); | |
| 587 | + if (data==null || data.getYn()==YnEnums.NO.getId()){ | |
| 588 | + br.setErrorcode(ErrorCodeConstants.NO_DATA); | |
| 589 | + br.setErrormsg("没有查询到数据"); | |
| 590 | + return br; | |
| 591 | + } | |
| 592 | + | |
| 593 | + | |
| 594 | + if (org.apache.commons.lang.StringUtils.isEmpty(data.getParentId())){ | |
| 595 | + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 596 | + br.setErrormsg("数据异常"); | |
| 597 | + return br; | |
| 598 | + } | |
| 599 | + | |
| 600 | + Patients patients = patientsService.findOnePatientById(data.getParentId()); | |
| 601 | + if (patients==null || patients.getYn()==YnEnums.NO.getId()){ | |
| 602 | + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 603 | + br.setErrormsg("孕妇信息不存在"); | |
| 604 | + return br; | |
| 605 | + } | |
| 606 | + | |
| 607 | + Map<String,Object> map= new HashMap<>(); | |
| 608 | + /* 基本信息 */ | |
| 609 | + //孕妇基本信息 | |
| 610 | + map.put("id",data.getId()); | |
| 611 | + map.put("username",patients.getUsername()); | |
| 612 | + map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth())); | |
| 613 | + map.put("age",DateUtil.getAge(patients.getBirth())); | |
| 614 | + map.put("phone",patients.getPhone()); | |
| 615 | + map.put("fmWeek",patients.getFmWeek()); | |
| 616 | + map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate())); | |
| 617 | + map.put("mremark",patients.getMremark()); | |
| 618 | + map.put("oRiskFactor",patients.getoRiskFactor()); | |
| 619 | + map.put("riskScore",patients.getRiskScore()); | |
| 620 | + //产检基本信息 | |
| 621 | + map.put("checkDate",DateUtil.getyyyy_MM_dd(data.getCheckDate())); | |
| 622 | + map.put("currentDueDate",data.getCurrentDueDate()); | |
| 623 | + map.put("checkDoctor", data.getCheckDoctor()); | |
| 624 | + String hospital = ""; | |
| 625 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getHospitalId())){ | |
| 626 | + Organization organization = organizationService.getOrganization(Integer.parseInt(data.getHospitalId())); | |
| 627 | + if (organization!=null && organization.getYn()==YnEnums.YES.getId()){ | |
| 628 | + hospital = organization.getName(); | |
| 629 | + } | |
| 630 | + } | |
| 631 | + map.put("hospital", hospital); | |
| 632 | + map.put("nextCheckTime",DateUtil.getyyyy_MM_dd(data.getNextCheckTime())); | |
| 633 | + map.put("cDueWeek", data.getcDueWeek()); | |
| 634 | + | |
| 635 | + /* 复诊信息 */ | |
| 636 | + map.put("chiefComplaint", data.getChiefComplaint()); | |
| 637 | + map.put("weight", UnitUtils.unitSplice(data.getWeight(), UnitConstants.KG)); | |
| 638 | + // 血压 | |
| 639 | + String ssy = ""; | |
| 640 | + String szy = ""; | |
| 641 | + Map<String, String> chBpMap = JsonUtil.getMap(data.getBp()); | |
| 642 | + if (MapUtils.isNotEmpty(chBpMap)) { | |
| 643 | + ssy = chBpMap.get("ssy"); | |
| 644 | + szy = chBpMap.get("szy"); | |
| 645 | + } | |
| 646 | + map.put("bp", UnitUtils.unitSplice(ssy + "/" + szy, UnitConstants.MMHG)); | |
| 647 | + map.put("gongGao", UnitUtils.unitSplice(data.getGongGao(), UnitConstants.CM)); | |
| 648 | + map.put("abdominalCircumference", UnitUtils.unitSplice(data.getAbdominalCircumference(), UnitConstants.CM)); | |
| 649 | + String edema = ""; | |
| 650 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getEdema())){ | |
| 651 | + for (FuZhongEnums fuZhongEnums:FuZhongEnums.values()){ | |
| 652 | + if (data.getEdema().equals(fuZhongEnums.getId())){ | |
| 653 | + edema = fuZhongEnums.getName(); | |
| 654 | + } | |
| 655 | + } | |
| 656 | + } | |
| 657 | + map.put("edema",edema); | |
| 658 | + | |
| 659 | + map.put("tireNumber", TaiShuEnums.getTitle(data.getTireNumber())); | |
| 660 | + //胎儿情况 | |
| 661 | + List<Map> tireList = new ArrayList<>(); | |
| 662 | + if (CollectionUtils.isNotEmpty(data.getTireData())){ | |
| 663 | + for (Object temp : data.getTireData()){ | |
| 664 | + Map<String,String> tire = JsonUtil.getMap(temp.toString()); | |
| 665 | + String heartRate = tire.get("heartRate"); | |
| 666 | + String fetalPosition = tire.get("fetalPosition"); | |
| 667 | + String fetalPresentation = tire.get("fetalPresentation"); | |
| 668 | + String join = tire.get("join"); | |
| 669 | + | |
| 670 | + Map<String,Object> tireMap = new HashMap<>(); | |
| 671 | + tireMap.put("heartRate",UnitUtils.unitSplice(heartRate, UnitConstants.CIFEN)); | |
| 672 | + tireMap.put("fetalPosition", FetalPositionEnums.getTitle(fetalPosition)); | |
| 673 | + tireMap.put("fetalPresentation", FetalEnums.getTitle(fetalPresentation)); | |
| 674 | + tireMap.put("join", JoinEnums.getTitle(join)); | |
| 675 | + tireList.add(tireMap); | |
| 676 | + } | |
| 677 | + } | |
| 678 | + map.put("tireData",tireList); | |
| 679 | + | |
| 680 | + /* 辅助信息 */ | |
| 681 | + map.put("hemoglobin", UnitUtils.unitSplice(data.getHemoglobin(), UnitConstants.GL)); | |
| 682 | + map.put("urineProtein",data.getUrineProtein()); | |
| 683 | + map.put("bloodSugar", UnitUtils.unitSplice(data.getUrineProtein(), UnitConstants.MMOLL)); | |
| 684 | + map.put("bChao",data.getbChao()); | |
| 685 | + | |
| 686 | + /* 诊断指导 */ | |
| 687 | + String diagnosis = ""; | |
| 688 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getDiagnosis())){ | |
| 689 | + List<String> temp = JsonUtil.toList(data.getDiagnosis(), String.class); | |
| 690 | + if (CollectionUtils.isNotEmpty(temp)){ | |
| 691 | + | |
| 692 | + StringBuilder sb = new StringBuilder(); | |
| 693 | + | |
| 694 | + for (String sId : temp){ | |
| 695 | + sb.append(FunvCommonUtil.getBaseicConfigByid(sId, basicConfigService)).append(","); | |
| 696 | + } | |
| 697 | + if (sb.toString().endsWith(",")) { | |
| 698 | + diagnosis = sb.substring(0, sb.length() - 1); | |
| 699 | + }else { | |
| 700 | + diagnosis = sb.toString(); | |
| 701 | + } | |
| 702 | + } | |
| 703 | + } | |
| 704 | + map.put("diagnosis",diagnosis); | |
| 705 | + map.put("treatmentOpinion",data.getTreatmentOpinion()); | |
| 706 | + map.put("guide",data.getGuide()); | |
| 707 | + | |
| 708 | + br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 709 | + br.setErrormsg("成功"); | |
| 710 | + br.setData(map); | |
| 711 | + return br; | |
| 712 | + } | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 570 | 718 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
a2edaa1
| ... | ... | @@ -235,21 +235,13 @@ |
| 235 | 235 | if (CollectionUtils.isEmpty(babyModels)) { |
| 236 | 236 | handBaby(deliverAddRequest, babyList, maternalDeliverModel, list, babyIds, parentId, userName, patients1, hospitalId); |
| 237 | 237 | } else { |
| 238 | - List<MaternalDeliverModel.Baby> babies = new ArrayList<>(); | |
| 239 | - for (BabyModel babyModel : babyModels) { | |
| 240 | - MaternalDeliverModel.Baby baby1 = new MaternalDeliverModel.Baby(babyModel); | |
| 241 | - babies.add(baby1); | |
| 242 | - } | |
| 243 | - maternalDeliverModel.setBaby(babies); | |
| 238 | + maternalDeliverModel.setBaby(updateBaby(deliverAddRequest,list)); | |
| 244 | 239 | } |
| 245 | 240 | } |
| 246 | 241 | |
| 247 | 242 | maternalDeliverModel.setHospitalId(hospitalId); |
| 248 | 243 | //做分娩的时候需要删除产筛数据 |
| 249 | - /* SieveQuery sieveQuery = new SieveQuery(); | |
| 250 | - sieveQuery.setParentId(deliverAddRequest.getParentId()); | |
| 251 | - sieveQuery.setYn(YnEnums.YES.getId()); | |
| 252 | - sieveQuery.setHospitalId(hospitalId);*/ | |
| 244 | + | |
| 253 | 245 | sieveService.deleteSieve(deliverAddRequest.getParentId(), hospitalId, null); |
| 254 | 246 | |
| 255 | 247 | maternalDeliverModel.setYn(YnEnums.YES.getId()); |
| 256 | 248 | |
| ... | ... | @@ -286,51 +278,8 @@ |
| 286 | 278 | //获取到小孩信息 |
| 287 | 279 | List<MatDeliverAddRequest.Baby> list = deliverAddRequest.getBabies(); |
| 288 | 280 | //修改小孩信息 |
| 289 | - // if (CollectionUtils.isNotEmpty(list)) { | |
| 290 | - // for (MatDeliverAddRequest.Baby baby : list) { | |
| 291 | - // MaternalDeliverModel.Baby babyModel = baby.convertToDataModel(); | |
| 292 | - // //判断妊娠结局是活产才添加数据 | |
| 293 | - // BabyModel babyModel1=new BabyModel(); | |
| 294 | - // MatDeliverQuery query=new MatDeliverQuery(); | |
| 295 | - // query.setParentId(deliverAddRequest.getParentId()); | |
| 296 | - // babyModel1.setParentId(deliverAddRequest.getParentId()); | |
| 297 | - // if ((RenShenJieJuEnums.O.getId() + "").equals(baby.getPregnancyOut())) { | |
| 298 | - // babyModel1.setYn(YnEnums.YES.getId()); | |
| 299 | - // }else{ | |
| 300 | - // babyModel1.setYn(YnEnums.NO.getId()); | |
| 301 | - // } | |
| 302 | - // babyService.findAndModify(query.convertToQuery(), babyModel1); | |
| 303 | - // babyList.add(babyModel); | |
| 304 | - // } | |
| 305 | - // maternalDeliverModel.setBaby(babyList); | |
| 306 | - // } | |
| 307 | 281 | if (CollectionUtils.isNotEmpty(list)) { |
| 308 | - for (MatDeliverAddRequest.Baby baby : list) { | |
| 309 | - MaternalDeliverModel.Baby babyModel = baby.convertToDataModel(); | |
| 310 | - //判断妊娠结局是活产才添加数据 | |
| 311 | - BabyModel babyModel1=new BabyModel(); | |
| 312 | - MatDeliverQuery query=new MatDeliverQuery(); | |
| 313 | - query.setId(deliverAddRequest.getId()); | |
| 314 | - babyModel1.setParentId(deliverAddRequest.getParentId()); | |
| 315 | - if ((RenShenJieJuEnums.O.getId() + "").equals(baby.getPregnancyOut())) { | |
| 316 | - babyModel1.setYn(YnEnums.YES.getId()); | |
| 317 | - }else{ | |
| 318 | - babyModel1.setYn(YnEnums.NO.getId()); | |
| 319 | - } | |
| 320 | - babyModel1.setBirth(DateUtil.parseYMD(baby.getDueTime())); | |
| 321 | - babyModel1.setSex(Integer.valueOf(baby.getBabyGender())); | |
| 322 | - Map map = deliverAddRequest.getDeliveryMode(); | |
| 323 | - String fmfs = null; | |
| 324 | - if (!map.isEmpty()) { | |
| 325 | - fmfs = map.get("fmfs").toString(); | |
| 326 | - } | |
| 327 | - babyModel1.setDueType(fmfs); | |
| 328 | - babyModel1.setBabyHeight(baby.getBabyHeight()); | |
| 329 | - babyModel1.setBabyWeight(baby.getBabyWeight()); | |
| 330 | - babyService.findAndModify(query.convertToQuery(), babyModel1); | |
| 331 | - babyList.add(babyModel); | |
| 332 | - } | |
| 333 | - maternalDeliverModel.setBaby(babyList); | |
| 282 | + maternalDeliverModel.setBaby(updateBaby(deliverAddRequest,list)); | |
| 334 | 283 | } |
| 335 | 284 | |
| 336 | 285 | matDeliverService.updateOne(maternalDeliverModel, maternalDeliverModel.getId()); |
| 337 | 286 | |
| ... | ... | @@ -473,7 +422,44 @@ |
| 473 | 422 | } |
| 474 | 423 | } |
| 475 | 424 | |
| 425 | + /** | |
| 426 | + * 处理儿童变更 | |
| 427 | + * | |
| 428 | + * @param deliverAddRequest | |
| 429 | + * @param list | |
| 430 | + * @return | |
| 431 | + */ | |
| 432 | + private List updateBaby(MatDeliverAddRequest deliverAddRequest,List<MatDeliverAddRequest.Baby> list ){ | |
| 433 | + List<MaternalDeliverModel.Baby> babyList = new ArrayList<>(); | |
| 434 | + for (MatDeliverAddRequest.Baby baby : list) { | |
| 435 | + MaternalDeliverModel.Baby babyModel = baby.convertToDataModel(); | |
| 436 | + //判断妊娠结局是活产才添加数据 | |
| 437 | + BabyModel babyModel1=new BabyModel(); | |
| 438 | + MatDeliverQuery query=new MatDeliverQuery(); | |
| 439 | + query.setId(deliverAddRequest.getId()); | |
| 440 | + babyModel1.setParentId(deliverAddRequest.getParentId()); | |
| 441 | + if ((RenShenJieJuEnums.O.getId() + "").equals(baby.getPregnancyOut())) { | |
| 442 | + babyModel1.setYn(YnEnums.YES.getId()); | |
| 443 | + }else{ | |
| 444 | + babyModel1.setYn(YnEnums.NO.getId()); | |
| 445 | + } | |
| 446 | + babyModel1.setBirth(DateUtil.parseYMD(baby.getDueTime())); | |
| 447 | + babyModel1.setSex(Integer.valueOf(baby.getBabyGender())); | |
| 448 | + Map map = deliverAddRequest.getDeliveryMode(); | |
| 449 | + String fmfs = null; | |
| 450 | + if (!map.isEmpty()) { | |
| 451 | + fmfs = map.get("fmfs").toString(); | |
| 452 | + } | |
| 453 | + babyModel1.setDueType(fmfs); | |
| 454 | + babyModel1.setBabyHeight(baby.getBabyHeight()); | |
| 455 | + babyModel1.setBabyWeight(baby.getBabyWeight()); | |
| 456 | + babyService.findAndModify(query.convertToQuery(), babyModel1); | |
| 457 | + babyList.add(babyModel); | |
| 458 | + } | |
| 459 | + return babyList; | |
| 460 | + } | |
| 476 | 461 | |
| 462 | + | |
| 477 | 463 | /** |
| 478 | 464 | * 处理儿童 |
| 479 | 465 | * |
| ... | ... | @@ -1568,6 +1554,9 @@ |
| 1568 | 1554 | return newBabyManagerResult; |
| 1569 | 1555 | } |
| 1570 | 1556 | |
| 1557 | + @Autowired | |
| 1558 | + private CommonService commonService; | |
| 1559 | + | |
| 1571 | 1560 | public BaseObjectResponse findMatDeliverData(String id){ |
| 1572 | 1561 | |
| 1573 | 1562 | BaseObjectResponse br = new BaseObjectResponse(); |
| ... | ... | @@ -1609,8 +1598,21 @@ |
| 1609 | 1598 | map.put("fmWeek",patients.getFmWeek()); |
| 1610 | 1599 | map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 1611 | 1600 | map.put("mremark",patients.getMremark()); |
| 1612 | - map.put("oRiskFactor",patients.getoRiskFactor()); | |
| 1613 | - map.put("riskLevel", FunvCommonUtil.getBaseicConfigByid(patients.getRiskLevelId(),basicConfigService)); | |
| 1601 | + | |
| 1602 | + String riskFactor = ""; | |
| 1603 | + if (StringUtils.isNotEmpty(patients.getoRiskFactor())){ | |
| 1604 | + riskFactor = patients.getoRiskFactor(); | |
| 1605 | + } | |
| 1606 | + | |
| 1607 | + if (CollectionUtils.isNotEmpty(patients.getRiskFactorId())){ | |
| 1608 | + if (StringUtils.isEmpty(riskFactor)){ | |
| 1609 | + riskFactor = commonService.resloveFactor(patients.getRiskFactorId()); | |
| 1610 | + }else { | |
| 1611 | + riskFactor = riskFactor + "," + commonService.resloveFactor(patients.getRiskFactorId()); | |
| 1612 | + } | |
| 1613 | + } | |
| 1614 | + map.put("oRiskFactor",riskFactor); | |
| 1615 | + map.put("riskLevel", FunvCommonUtil.getBaseicConfigByid(patients.getRiskLevelId(), basicConfigService)); | |
| 1614 | 1616 | map.put("riskScore",patients.getRiskScore()); |
| 1615 | 1617 | |
| 1616 | 1618 | map.put("deliveryDate", data.getDueDate()); |
| ... | ... | @@ -1639,11 +1641,7 @@ |
| 1639 | 1641 | map.put("deliverDoctor", deliverDoctor); |
| 1640 | 1642 | |
| 1641 | 1643 | /* 分娩信息 */ |
| 1642 | - String tireNumber = ""; | |
| 1643 | - if (data.getTireNumber()!=null){ | |
| 1644 | - | |
| 1645 | - } | |
| 1646 | - map.put("tireNumber", tireNumber);//胎数 | |
| 1644 | + map.put("tireNumber", TaiShuEnums.getTitle(data.getTireNumber() + ""));//胎数 | |
| 1647 | 1645 | map.put("placenta", data.getPlacenta());//胎盘 |
| 1648 | 1646 | |
| 1649 | 1647 | List<Map<String,Object>> placetaList = new ArrayList<>(); |
| ... | ... | @@ -1815,7 +1813,7 @@ |
| 1815 | 1813 | ExtPlacentaList.add(extMap); |
| 1816 | 1814 | } |
| 1817 | 1815 | } |
| 1818 | - map.put("ExtPlacentaList", ExtPlacentaList); | |
| 1816 | + map.put("extPlacentas", ExtPlacentaList); | |
| 1819 | 1817 | |
| 1820 | 1818 | //新生儿信息 |
| 1821 | 1819 | |
| ... | ... | @@ -1851,7 +1849,7 @@ |
| 1851 | 1849 | } |
| 1852 | 1850 | } |
| 1853 | 1851 | |
| 1854 | - map.put("babyList", babyList); | |
| 1852 | + map.put("baby", babyList); | |
| 1855 | 1853 | |
| 1856 | 1854 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 1857 | 1855 | br.setErrormsg("成功"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
View file @
a2edaa1
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 | import com.lyms.platform.permission.service.UsersService; |
| 23 | 23 | import com.lyms.platform.pojo.*; |
| 24 | 24 | import com.lyms.platform.query.MatDeliverQuery; |
| 25 | +import com.lyms.platform.query.PatientsQuery; | |
| 25 | 26 | import com.lyms.platform.query.PostReviewQuery; |
| 26 | 27 | import com.lyms.platform.query.ReferralApplyOrderQuery; |
| 27 | 28 | import org.apache.commons.collections.CollectionUtils; |
| 28 | 29 | |
| 29 | 30 | |
| 30 | 31 | |
| ... | ... | @@ -121,19 +122,24 @@ |
| 121 | 122 | patients2.setId(patients1.getId()); |
| 122 | 123 | patientsService.updatePatient(patients2); |
| 123 | 124 | } |
| 124 | - syncMaster(patients.getId()); | |
| 125 | 125 | patientsService.updateNextCheckTime(patients.getId(), postReviewRequest.getNextCheckTime()); |
| 126 | 126 | |
| 127 | - handlApplyOrder(patients,hospital,postReviewRequest); | |
| 127 | + handlApplyOrder(patients, hospital, postReviewRequest); | |
| 128 | + syncMaster(patients.getId()); | |
| 128 | 129 | |
| 129 | 130 | } else { |
| 131 | + | |
| 130 | 132 | Patients patients = patientsService.findOnePatientById(postReviewRequest.getParentId()); |
| 131 | 133 | if (StringUtils.isNotEmpty(postReviewRequest.getDueDate())) { |
| 132 | 134 | patients.setFmDate(DateUtil.parseYMD(postReviewRequest.getDueDate())); |
| 133 | 135 | patients.setType(3); |
| 134 | 136 | patientsService.updatePatient(patients); |
| 135 | 137 | } |
| 136 | - postReviewService.updatePostById(postReviewRequest.convertToDataModel(), postReviewRequest.getId()); | |
| 138 | + patients.setLastCheckEmployeeId(postReviewModel.getProdDoctor()); | |
| 139 | + patientsService.updatePatient(patients); | |
| 140 | + patientsService.updateNextCheckTime(patients.getId(), postReviewRequest.getNextCheckTime()); | |
| 141 | + postReviewService.updatePostById(postReviewModel, postReviewRequest.getId()); | |
| 142 | + syncMaster(patients.getId()); | |
| 137 | 143 | } |
| 138 | 144 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 139 | 145 | } |
| 140 | 146 | |
| 141 | 147 | |
| ... | ... | @@ -203,17 +209,33 @@ |
| 203 | 209 | |
| 204 | 210 | //当非建档医院修改初诊信息时,需要同步给建档医院 |
| 205 | 211 | private void syncMaster(String parentId) { |
| 212 | + if(StringUtils.isNotEmpty(parentId)){ | |
| 213 | + //当前非建档医院最新的状态 | |
| 214 | + Patients patients = patientsService.findOnePatientById(parentId); | |
| 206 | 215 | |
| 207 | - //当前非建档医院最新的状态 | |
| 208 | - Patients patients = patientsService.findOnePatientById(parentId); | |
| 216 | + if (StringUtils.isNotEmpty(patients.getSource())) { | |
| 217 | + Patients masterPatients = patientsService.findOnePatientById(patients.getSource()); | |
| 209 | 218 | |
| 210 | - if (StringUtils.isNotEmpty(patients.getSource())) { | |
| 211 | - Patients masterPatients = patientsService.findOnePatientById(patients.getSource()); | |
| 212 | - | |
| 213 | - masterPatients.setNextCheckTime(patients.getNextCheckTime()); | |
| 214 | - masterPatients.setFmDate(patients.getFmDate()); | |
| 215 | - masterPatients.setLastCheckEmployeeId(patients.getLastCheckEmployeeId()); | |
| 216 | - patientsService.updatePatient(masterPatients); | |
| 219 | + masterPatients.setNextCheckTime(patients.getNextCheckTime()); | |
| 220 | + masterPatients.setFmDate(patients.getFmDate()); | |
| 221 | + masterPatients.setLastCheckEmployeeId(patients.getLastCheckEmployeeId()); | |
| 222 | + patientsService.updatePatient(masterPatients); | |
| 223 | + }else { | |
| 224 | + PatientsQuery patientsQuery1=new PatientsQuery(); | |
| 225 | + patientsQuery1.setSource(parentId); | |
| 226 | + patientsQuery1.setYn(YnEnums.YES.getId()); | |
| 227 | + List<Patients> list= patientsService.queryPatient(patientsQuery1); | |
| 228 | + if(CollectionUtils.isNotEmpty(list)){ | |
| 229 | + for(Patients p:list){ | |
| 230 | + Patients p1= new Patients(); | |
| 231 | + p1.setId(p.getId()); | |
| 232 | + p1.setNextCheckTime(patients.getNextCheckTime()); | |
| 233 | + p1.setFmDate(patients.getFmDate()); | |
| 234 | + p1.setLastCheckEmployeeId(patients.getLastCheckEmployeeId()); | |
| 235 | + patientsService.updatePatient(p1); | |
| 236 | + } | |
| 237 | + } | |
| 238 | + } | |
| 217 | 239 | } |
| 218 | 240 | } |
| 219 | 241 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/UnitConstants.java
View file @
a2edaa1
| 1 | +package com.lyms.platform.operate.web.utils; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * | |
| 5 | + * 单位常量,用以返回值拼接 | |
| 6 | + * | |
| 7 | + * Created by Administrator on 2017/1/11 0011. | |
| 8 | + */ | |
| 9 | +public class UnitConstants { | |
| 10 | + | |
| 11 | + public static final String CM = " cm"; | |
| 12 | + public static final String KG = " kg"; | |
| 13 | + public static final String MMHG = " mmHg"; | |
| 14 | + public static final String CIFEN = " 次/分"; | |
| 15 | + public static final String GL = " g/L"; | |
| 16 | + public static final String MMOLL = " mmol/L"; | |
| 17 | + | |
| 18 | + | |
| 19 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/UnitUtils.java
View file @
a2edaa1
| 1 | +package com.lyms.platform.operate.web.utils; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * Created by Administrator on 2017/1/11 0011. | |
| 5 | + */ | |
| 6 | +public class UnitUtils { | |
| 7 | + | |
| 8 | + /** | |
| 9 | + * 拼接单位 | |
| 10 | + * @param data | |
| 11 | + * @param unit | |
| 12 | + * @return | |
| 13 | + */ | |
| 14 | + public static String unitSplice(Object data,String unit){ | |
| 15 | + if (data==null){ | |
| 16 | + return null; | |
| 17 | + } | |
| 18 | + return data.toString() + unit; | |
| 19 | + } | |
| 20 | + | |
| 21 | +} |