|
@@ -25,45 +25,46 @@ import java.util.Map;
|
|
|
public class FIRC0096 extends QCCatalogue {
|
|
|
@Autowired
|
|
|
private SpecialStorageUtil specialStorageUtil;
|
|
|
+
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
- if(inputInfo.getFirstCourseRecordDoc() == null){
|
|
|
+ if (inputInfo.getFirstCourseRecordDoc() == null) {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
List<String> diags_out = new ArrayList<>();
|
|
|
Map<String, String> hostpital_standDiag = specialStorageUtil.getJsonStringValue(KernelConstants.HOSPITAL_DIAG_MAP);
|
|
|
- if (hostpital_standDiag == null){
|
|
|
+ if (hostpital_standDiag == null) {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
|
- if(firstCourseRecordDoc != null){
|
|
|
+ if (firstCourseRecordDoc != null) {
|
|
|
DiagLabel initialDiagLabel = firstCourseRecordDoc.getInitialDiagLabel();
|
|
|
- if(initialDiagLabel != null){
|
|
|
+ if (initialDiagLabel != null) {
|
|
|
List<Diag> diags = initialDiagLabel.getDiags();
|
|
|
- if(diags != null && diags.size()>0){
|
|
|
- for (Diag diag:diags) {
|
|
|
- String hospitalDiagName = diag.getHospitalDiagName().trim().replace("待查","").replace("?","").replace("?","");
|
|
|
- if ("ACT".equals(hospitalDiagName)){
|
|
|
+ if (diags != null && diags.size() > 0) {
|
|
|
+ for (Diag diag : diags) {
|
|
|
+ String hospitalDiagName = diag.getHospitalDiagName().trim().replace("待查", "").replace("?", "").replace("?", "");
|
|
|
+ if ("ACT".equals(hospitalDiagName) || hospitalDiagName.startsWith("孕")) {
|
|
|
continue;
|
|
|
}
|
|
|
- if (hospitalDiagName.contains("伴")){
|
|
|
- hospitalDiagName = hospitalDiagName.substring(0,hospitalDiagName.indexOf("伴"));
|
|
|
+ if (hospitalDiagName.contains("伴")) {
|
|
|
+ hospitalDiagName = hospitalDiagName.substring(0, hospitalDiagName.indexOf("伴"));
|
|
|
}
|
|
|
- if (hospitalDiagName.length() > 15){
|
|
|
+ if (hospitalDiagName.length() > 15) {
|
|
|
continue;
|
|
|
}
|
|
|
- if(!hostpital_standDiag.containsKey(hospitalDiagName)){
|
|
|
+ if (!hostpital_standDiag.containsKey(hospitalDiagName)) {
|
|
|
diags_out.add(hospitalDiagName);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- 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");
|
|
|
}
|
|
|
}
|