Commit 64552b653e75b5de3b03f0c0e47f0a9fb931cc7c
1 parent
edbc2a96f8
Exists in
master
and in
6 other branches
修改分娩接口bug
Showing 3 changed files with 77 additions and 19 deletions
platform-common/src/main/java/com/lyms/platform/common/enums/DeathCauseEnums.java
View file @
64552b6
| 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> |
| ... | ... | @@ -15,6 +17,18 @@ |
| 15 | 17 | |
| 16 | 18 | private String id; |
| 17 | 19 | private String name; |
| 20 | + | |
| 21 | + public static String getName(String id){ | |
| 22 | + if (StringUtils.isNotEmpty(id)){ | |
| 23 | + for (DeathCauseEnums deathCauseEnums : DeathCauseEnums.values()){ | |
| 24 | + if (deathCauseEnums.getId().equals(id)){ | |
| 25 | + return deathCauseEnums.getName(); | |
| 26 | + } | |
| 27 | + } | |
| 28 | + } | |
| 29 | + return ""; | |
| 30 | + } | |
| 31 | + | |
| 18 | 32 | |
| 19 | 33 | public String getId() { |
| 20 | 34 | return id; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
64552b6
| ... | ... | @@ -260,7 +260,7 @@ |
| 260 | 260 | map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI)); |
| 261 | 261 | map.put("phone",patients.getPhone()); |
| 262 | 262 | //基本信息孕周 |
| 263 | - map.put("fmWeek", ResolveUtils.getPregnancyWeek(patients.getLastMenses(),new Date())); | |
| 263 | + map.put("fmWeek", patients.getPhone()); | |
| 264 | 264 | map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 265 | 265 | map.put("mremark",patients.getMremark()); |
| 266 | 266 | |
| ... | ... | @@ -589,7 +589,7 @@ |
| 589 | 589 | map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth())); |
| 590 | 590 | map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()), UnitConstants.SUI)); |
| 591 | 591 | map.put("phone",patients.getPhone()); |
| 592 | - map.put("fmWeek", ResolveUtils.getPregnancyWeek(patients.getLastMenses(), new Date())); | |
| 592 | + map.put("fmWeek", patients.getPhone()); | |
| 593 | 593 | map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 594 | 594 | map.put("mremark",patients.getMremark()); |
| 595 | 595 | |
| ... | ... | @@ -703,6 +703,20 @@ |
| 703 | 703 | } |
| 704 | 704 | |
| 705 | 705 | |
| 706 | + public static String checkWeek(Patients patients){ | |
| 707 | + | |
| 708 | + if (patients.getDueStatus()!=null && patients.getDueStatus()==1){ | |
| 709 | + return "终止妊娠"; | |
| 710 | + }else if (patients.getType()!=null && patients.getType() == 3){ | |
| 711 | + return "已分娩"; | |
| 712 | + }else if (patients.getLastMenses()!=null){ | |
| 713 | + return ResolveUtils.getPregnancyWeek(patients.getLastMenses(), new Date()); | |
| 714 | + } | |
| 715 | + return ""; | |
| 716 | + } | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 706 | 720 | /** |
| 707 | 721 | * 分娩查询 |
| 708 | 722 | * @param id |
| ... | ... | @@ -746,7 +760,7 @@ |
| 746 | 760 | map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth())); |
| 747 | 761 | map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI)); |
| 748 | 762 | map.put("phone",patients.getPhone()); |
| 749 | - map.put("fmWeek",patients.getFmWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(patients.getFmWeek())); | |
| 763 | + map.put("fmWeek",checkWeek(patients)); | |
| 750 | 764 | map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 751 | 765 | map.put("mremark",patients.getMremark()); |
| 752 | 766 | |
| ... | ... | @@ -757,7 +771,7 @@ |
| 757 | 771 | } |
| 758 | 772 | |
| 759 | 773 | map.put("riskFactor", ResolveUtils.queryHighRisk(highScoreResult)); |
| 760 | - map.put("riskScore", UnitUtils.unitSplice(patients.getRiskScore(),UnitConstants.FEN)); | |
| 774 | + map.put("riskScore", patients.getRiskScore() == 0 ? "" : UnitUtils.unitSplice(patients.getRiskScore(),UnitConstants.FEN)); | |
| 761 | 775 | |
| 762 | 776 | map.put("deliveryDate", data.getDueDate()); |
| 763 | 777 | map.put("dueWeek", data.getDueWeek()); |
| ... | ... | @@ -816,6 +830,9 @@ |
| 816 | 830 | fetalPresentation += placenta.getFetalPresentation() == null ? "" : placenta.getFetalPresentation(); |
| 817 | 831 | //胎心率 |
| 818 | 832 | heartRate += placenta.getHeartRate() == null ? "" : placenta.getHeartRate().toString(); |
| 833 | + //转换为整数 | |
| 834 | + Integer a = (int)Double.parseDouble(heartRate); | |
| 835 | + heartRate = String.valueOf(a); | |
| 819 | 836 | |
| 820 | 837 | } |
| 821 | 838 | |
| ... | ... | @@ -831,6 +848,9 @@ |
| 831 | 848 | } |
| 832 | 849 | } |
| 833 | 850 | heartRate += placenta.get("heartRate") == null ? "" : placenta.get("heartRate"); |
| 851 | + Integer a = (int)Double.parseDouble(heartRate); | |
| 852 | + heartRate = String.valueOf(a); | |
| 853 | + | |
| 834 | 854 | fetalPresentation += placenta.get("fetalPresentation") == null ? "" : placenta.get("fetalPresentation"); |
| 835 | 855 | } |
| 836 | 856 | } |
| ... | ... | @@ -872,7 +892,11 @@ |
| 872 | 892 | } |
| 873 | 893 | } |
| 874 | 894 | map.put("deliveryMode", deliveryMode);//分娩方式 |
| 875 | - map.put("operationCause", data.getOperationCause()==null ? "--":data.getOperationCause()); | |
| 895 | + if (deliveryMode.contains("顺产")){ | |
| 896 | + map.put("operationCause", ""); | |
| 897 | + }else { | |
| 898 | + map.put("operationCause", data.getOperationCause()==null ? "--":data.getOperationCause()); | |
| 899 | + } | |
| 876 | 900 | |
| 877 | 901 | findProcess(data.getProdprocess(), map);//1,2,3产程 |
| 878 | 902 | findTotalProcess(data.getTotalprocess(),map);//总产程 |
| ... | ... | @@ -885,7 +909,7 @@ |
| 885 | 909 | |
| 886 | 910 | /* 产后生理 */ |
| 887 | 911 | map.put("maternalInfo", data.getMaternalInfo()==null?"":CfEnums.getTitle(data.getMaternalInfo())); |
| 888 | - map.put("deathCause", data.getDeathCause()==null ? "--" : data.getDeathCause()); | |
| 912 | + map.put("deathCause", com.lyms.platform.common.utils.StringUtils.isEmpty(data.getDeathCause()) ? "--" : DeathCauseEnums.getName(data.getDeathCause())); | |
| 889 | 913 | // 产后血压 收缩压,舒张压 |
| 890 | 914 | String ssy = ""; |
| 891 | 915 | String szy = ""; |
| ... | ... | @@ -925,7 +949,7 @@ |
| 925 | 949 | loseBloodCause = sxCauseEnums.getName(); |
| 926 | 950 | } |
| 927 | 951 | } |
| 928 | - if (SXCauseEnums.O5.getName().equals(data.getLoseBloodCause()) && StringUtils.isNotEmpty(loseBloodCauseMap.get("other"))) { | |
| 952 | + if (SXCauseEnums.O5.getName().equals(loseBloodCause) && StringUtils.isNotEmpty(loseBloodCauseMap.get("other"))) { | |
| 929 | 953 | loseBloodCause = loseBloodCauseMap.get("other"); |
| 930 | 954 | } |
| 931 | 955 | } |
| 932 | 956 | |
| ... | ... | @@ -943,10 +967,20 @@ |
| 943 | 967 | if (CollectionUtils.isNotEmpty(data.getExtPlacentas())){ |
| 944 | 968 | for (MaternalDeliverModel.ExtPlacenta temp : data.getExtPlacentas()){ |
| 945 | 969 | Map<String,Object> extMap = new HashMap<>(); |
| 946 | - extMap.put("tpmcType", TaiShuEnums.getTpNameById(temp.getTpmcType())); | |
| 970 | + String tpmcType = ""; | |
| 971 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(temp.getTpmcType())){ | |
| 972 | + for (TpmcTypeEnums tpmcTypeEnums : TpmcTypeEnums.values()){ | |
| 973 | + if (temp.getTpmcType().equals(tpmcTypeEnums.getId())){ | |
| 974 | + tpmcType = tpmcTypeEnums.getName(); | |
| 975 | + break; | |
| 976 | + } | |
| 977 | + } | |
| 978 | + } | |
| 979 | + extMap.put("tpmcType", tpmcType); | |
| 980 | + | |
| 947 | 981 | extMap.put("mcType", FunvCommonUtil.checkMianChuFS(temp.getMcType())); |
| 948 | 982 | String tpSize = ""; |
| 949 | - tpSize += temp.getTpSize().get("c") + "*" + temp.getTpSize().get("k") + "*" + temp.getTpSize().get("g") + UnitConstants.CM; | |
| 983 | + tpSize += temp.getTpSize().get("c") + UnitConstants.CM + "*" + temp.getTpSize().get("k") + UnitConstants.CM + "*" + temp.getTpSize().get("g") + UnitConstants.CM; | |
| 950 | 984 | extMap.put("tpSize",tpSize); |
| 951 | 985 | extMap.put("tpWeight",UnitUtils.unitSplice(temp.getTpWeight(),UnitConstants.G)); |
| 952 | 986 | extMap.put("umbilicalCordLength",UnitUtils.unitSplice(temp.getUmbilicalCordLength(),UnitConstants.CM)); |
| ... | ... | @@ -984,7 +1018,7 @@ |
| 984 | 1018 | for (MaternalDeliverModel.Baby temp : data.getBaby()){ |
| 985 | 1019 | Map<String,Object> babyMap = new HashMap<>(); |
| 986 | 1020 | babyMap.put("dueTime",temp.getDueTime()); |
| 987 | - babyMap.put("pregnancyOut",temp.getPregnancyOut()==null?"" : StopPregEnums.getTitle(Integer.parseInt(temp.getPregnancyOut()))); | |
| 1021 | + babyMap.put("pregnancyOut",temp.getPregnancyOut()==null? "" : RenShenJieJuEnums.getTitle(temp.getPregnancyOut())); | |
| 988 | 1022 | babyMap.put("deformity",temp.getDeformity()==null ? "" : temp.getDeformity() == 1 ? "是" : "否"); |
| 989 | 1023 | babyMap.put("babyGender",temp.getBabyGender() == null ? "" : SexEnum.getTextById( |
| 990 | 1024 | Integer.parseInt(temp.getBabyGender()))); |
| 991 | 1025 | |
| ... | ... | @@ -996,11 +1030,16 @@ |
| 996 | 1030 | String apgarScorePf10 = ""; |
| 997 | 1031 | Map<String, String> m = JsonUtil.getMap(temp.getApgarScore()); |
| 998 | 1032 | if (MapUtils.isNotEmpty(map)) { |
| 999 | - apgarScorePf1 += m.get("pf1") == null ? "" : (m.get("pf1") + "*"); | |
| 1000 | - apgarScorePf5 += m.get("pf5") == null ? "" : (m.get("pf5") + "*"); | |
| 1033 | + apgarScorePf1 += m.get("pf1") == null ? "" : m.get("pf1"); | |
| 1034 | + apgarScorePf5 += m.get("pf5") == null ? "" : m.get("pf5"); | |
| 1001 | 1035 | apgarScorePf10 += m.get("pf10") == null ? "" : m.get("pf10"); |
| 1002 | 1036 | } |
| 1003 | - babyMap.put("apgarScore", UnitUtils.unitSplice(apgarScorePf1 + apgarScorePf5 + apgarScorePf10,UnitConstants.FEN)); | |
| 1037 | + String apgarScore = ""; | |
| 1038 | + | |
| 1039 | + if (StringUtils.isNotEmpty(apgarScorePf1) && StringUtils.isNotEmpty(apgarScorePf5) && StringUtils.isNotEmpty(apgarScorePf10)){ | |
| 1040 | + apgarScore = apgarScorePf1 + UnitConstants.FEN + " - " + apgarScorePf5 + UnitConstants.FEN + " - " + apgarScorePf10 + UnitConstants.FEN; | |
| 1041 | + } | |
| 1042 | + babyMap.put("apgarScore", apgarScore); | |
| 1004 | 1043 | babyMap.put("asphyxiaM",UnitUtils.unitSplice(temp.getAsphyxiaM(),UnitConstants.FZ)); |
| 1005 | 1044 | babyMap.put("contactStartM",UnitUtils.unitSplice(temp.getContactStartM(),UnitConstants.FZ)); |
| 1006 | 1045 | babyMap.put("contactM",UnitUtils.unitSplice(temp.getContactM(),UnitConstants.FZ)); |
| ... | ... | @@ -1025,7 +1064,7 @@ |
| 1025 | 1064 | |
| 1026 | 1065 | Map<String, String> totalprocessMap = JsonUtil.getMap(totalProcess); |
| 1027 | 1066 | if (MapUtils.isNotEmpty(totalprocessMap)) { |
| 1028 | - p = totalprocessMap.get("h") + "时," + totalprocessMap.get("m") + "分"; | |
| 1067 | + p = totalprocessMap.get("h") + "时" + totalprocessMap.get("m") + "分"; | |
| 1029 | 1068 | } |
| 1030 | 1069 | map.put("totalProcess",p); |
| 1031 | 1070 | return map; |
| 1032 | 1071 | |
| ... | ... | @@ -1046,11 +1085,11 @@ |
| 1046 | 1085 | } |
| 1047 | 1086 | Map<String, String> prodprocessTwo = prodprocessMap.get("two"); |
| 1048 | 1087 | if (MapUtils.isNotEmpty(prodprocessTwo)) { |
| 1049 | - two = prodprocessOne.get("h") + "时" + prodprocessTwo.get("m") + "分"; | |
| 1088 | + two = prodprocessTwo.get("h") + "时" + prodprocessTwo.get("m") + "分"; | |
| 1050 | 1089 | } |
| 1051 | 1090 | Map<String, String> prodprocessThree = prodprocessMap.get("three"); |
| 1052 | 1091 | if (MapUtils.isNotEmpty(prodprocessThree)) { |
| 1053 | - three = prodprocessOne.get("h") + "时" + prodprocessThree.get("m") + "分"; | |
| 1092 | + three = prodprocessThree.get("h") + "时" + prodprocessThree.get("m") + "分"; | |
| 1054 | 1093 | } |
| 1055 | 1094 | } |
| 1056 | 1095 | map.put("one",one); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java
View file @
64552b6
| ... | ... | @@ -359,15 +359,20 @@ |
| 359 | 359 | } |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | + /** | |
| 363 | + * 处理会阴撕裂等级 | |
| 364 | + * @param s | |
| 365 | + * @return | |
| 366 | + */ | |
| 362 | 367 | public static String checkSiLieLevel(Integer s) { |
| 363 | 368 | if (s==null){ |
| 364 | 369 | return ""; |
| 365 | 370 | } |
| 366 | - if (s == 1){ | |
| 371 | + if (s.equals(1)){ | |
| 367 | 372 | return ONE; |
| 368 | - }else if (s == 2){ | |
| 373 | + }else if (s.equals(2)){ | |
| 369 | 374 | return TWO; |
| 370 | - }else if (s == 3){ | |
| 375 | + }else if (s.equals(3)){ | |
| 371 | 376 | return THREE; |
| 372 | 377 | }else { |
| 373 | 378 | return ""; |