|
@@ -3,6 +3,7 @@ package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import com.lantone.qc.pub.model.entity.General;
|
|
|
import com.lantone.qc.pub.model.entity.GeneralDesc;
|
|
|
import com.lantone.qc.pub.model.label.PresentLabel;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -19,11 +20,22 @@ import java.util.List;
|
|
|
@Component
|
|
|
public class BEH0445 extends QCCatalogue {
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
- PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
|
|
|
- String text = presentLabel.getText();
|
|
|
- if(text != null){
|
|
|
- if(text.contains("睡眠")|| text.contains("纳眠")|| text.contains("入睡")){
|
|
|
- status.set("0");
|
|
|
+ List<GeneralDesc> generals = inputInfo.getBeHospitalizedDoc().getPresentLabel().getGenerals();
|
|
|
+ if(generals.size() > 0 || generals != null){
|
|
|
+ for (GeneralDesc general:generals) {
|
|
|
+ if(general.getName().contains("睡眠") || general.getName().contains("纳眠") || general.getName().contains("入睡")){
|
|
|
+ status.set("0");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<General> gens = inputInfo.getBeHospitalizedDoc().getPresentLabel().getGens();
|
|
|
+ if(gens.size() > 0 || gens != null){
|
|
|
+ for (General general:gens) {
|
|
|
+ if(general.getName().contains("睡眠") || general.getName().contains("纳眠") || general.getName().contains("入睡")){
|
|
|
+ status.set("0");
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|