|
@@ -7,7 +7,9 @@ import com.lantone.qc.pub.model.entity.Clinical;
|
|
|
import com.lantone.qc.pub.model.label.ChiefLabel;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -19,12 +21,25 @@ import java.util.List;
|
|
|
@Component
|
|
|
public class BEH0009 extends QCCatalogue {
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ Map<String,Integer> indexMap = new HashMap<>();
|
|
|
|
|
|
ChiefLabel chiefLabel = inputInfo.getBeHospitalizedDoc().getChiefLabel();
|
|
|
+ String chiefLabelText = chiefLabel.getText();
|
|
|
List<Clinical> clinicals = chiefLabel.getClinicals();
|
|
|
if(clinicals.size()>0){
|
|
|
- status = "0";
|
|
|
+ for (Clinical clinical:clinicals) {
|
|
|
+ indexMap.put(clinical.getName(),chiefLabelText.indexOf(clinical.getName()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ int index_ban = chiefLabelText.indexOf("伴");
|
|
|
+ if(indexMap.size()>0){
|
|
|
+ for (Map.Entry<String,Integer> s:indexMap.entrySet()) {
|
|
|
+ Integer value = s.getValue();
|
|
|
+ if(value<index_ban){
|
|
|
+ status = "0";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|