(MedicalRecord record)
| 115 | return null; |
| 116 | } |
| 117 | private static MedicalRecord preprocess(MedicalRecord record) { |
| 118 | String cce=""; |
| 119 | int i=-1; |
| 120 | List<String> mccList=new ArrayList<>(); |
| 121 | List<String> ccList=new ArrayList<>(); |
| 122 | List<String> ssValidList=new ArrayList<>(); |
| 123 | for (String x:record.zdList){ |
| 124 | i++; |
| 125 | if (i==0){ |
| 126 | cce=CCE.containsKey(x)?CCE.get(x):""; |
| 127 | }else{ |
| 128 | if (MCC.containsKey(x)&&(cce.isEmpty()||(!cce.isEmpty() && !MCC.get(x).equals(cce)))){ |
| 129 | mccList.add(x); |
| 130 | }else if (CC.containsKey(x)&&(cce.isEmpty()||(!cce.isEmpty() && !CC.get(x).equals(cce)))){ |
| 131 | ccList.add(x); |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | for (String x:record.ssList){ |
| 136 | if (SS_VALID.contains(x)){ |
| 137 | ssValidList.add(x); |
| 138 | } |
| 139 | } |
| 140 | record.cce=cce; |
| 141 | record.mccList=mccList.toArray(new String[0]); |
| 142 | record.ccList=ccList.toArray(new String[0]); |
| 143 | record.ssValidList=ssValidList.toArray(new String[0]); |
| 144 | if (cce!=null && cce.length()>0){ |
| 145 | checkMessages.putMessage(record.Index, String.format("主诊断%s排除表%s",record.zdList[0],cce)); |
| 146 | } |
| 147 | if (mccList!=null && mccList.size()>0){ |
| 148 | checkMessages.putMessage(record.Index, String.format("以下诊断是MCC:%s",mccList.stream().collect(Collectors.joining(" ")))); |
| 149 | } |
| 150 | if (ccList!=null && ccList.size()>0){ |
| 151 | checkMessages.putMessage(record.Index, String.format("以下诊断是CC:%s",ccList.stream().collect(Collectors.joining(" ")))); |
| 152 | } |
| 153 | if (ssValidList!=null && ssValidList.size()>0){ |
| 154 | checkMessages.putMessage(record.Index, String.format("以下手术操作有效:%s",ssValidList.stream().collect(Collectors.joining(" ")))); |
| 155 | } |
| 156 | return record; |
| 157 | } |
| 158 | private static GroupResult postprocess(GroupResult result){ |
| 159 | if (result.status.equals(DrgGroupStatus.SUCCESS.getDesc())){ |
| 160 | if (DRG.containsKey(result.drg)){ |
no test coverage detected