|
@@ -24,34 +24,38 @@ import java.util.Map;
|
|
|
*/
|
|
|
@Component
|
|
|
public class BEH0012 extends QCCatalogue {
|
|
|
- private static String[] strings = {"2型糖尿病"};
|
|
|
+ private static String[] strings = { "2型糖尿病" };
|
|
|
@Autowired
|
|
|
private RedisUtil redisUtil;
|
|
|
+
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
- if(inputInfo.getBeHospitalizedDoc() == null){
|
|
|
+ if (inputInfo.getBeHospitalizedDoc() == null) {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
List<String> diags_out = new ArrayList<>();
|
|
|
Map<String, String> hostpital_standDiag = redisUtil.getJsonStringValue(KernelConstants.HOSPITAL_DIAG_MAP);
|
|
|
List<Diag> diags = inputInfo.getBeHospitalizedDoc().getInitialDiagLabel().getDiags();
|
|
|
- if(diags != null && diags.size()>0){
|
|
|
- for (Diag diag:diags) {
|
|
|
+ if (diags != null && diags.size() > 0) {
|
|
|
+ for (Diag diag : diags) {
|
|
|
List<String> disList = Arrays.asList(strings);
|
|
|
- String hospitalDiagName = diag.getHospitalDiagName().trim().replace("待查","");
|
|
|
- if(!disList.contains(hospitalDiagName)){
|
|
|
- hospitalDiagName = hospitalDiagName.replaceAll("^[0-9]","");
|
|
|
- }
|
|
|
- if(!hostpital_standDiag.containsKey(hospitalDiagName)){
|
|
|
- diags_out.add(hospitalDiagName);
|
|
|
+ for (String diagSplit : diag.getHospitalDiagName().split("、")) {
|
|
|
+
|
|
|
+ String hospitalDiagName = diagSplit.trim().replace("待查", "");
|
|
|
+ if (!disList.contains(hospitalDiagName)) {
|
|
|
+ hospitalDiagName = hospitalDiagName.replaceAll("^[0-9]", "");
|
|
|
+ }
|
|
|
+ if (!hostpital_standDiag.containsKey(hospitalDiagName)) {
|
|
|
+ diags_out.add(hospitalDiagName);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- if(diags_out.size()>0){
|
|
|
- info.set(diags_out.toString().replace("[","").replace("]",""));
|
|
|
- }else {
|
|
|
+ if (diags_out.size() > 0) {
|
|
|
+ info.set(diags_out.toString().replace("[", "").replace("]", ""));
|
|
|
+ } else {
|
|
|
status.set("0");
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
status.set("0");
|
|
|
}
|
|
|
|