|
@@ -7,6 +7,8 @@ import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.entity.BodyPart;
|
|
import com.lantone.qc.pub.model.entity.BodyPart;
|
|
import com.lantone.qc.pub.model.entity.Clinical;
|
|
import com.lantone.qc.pub.model.entity.Clinical;
|
|
|
|
+import com.lantone.qc.pub.model.label.PresentLabel;
|
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
@@ -23,18 +25,24 @@ import java.util.List;
|
|
public class BEH0015 extends QCCatalogue {
|
|
public class BEH0015 extends QCCatalogue {
|
|
@Autowired
|
|
@Autowired
|
|
private SpecialStorageUtil specialStorageUtil;
|
|
private SpecialStorageUtil specialStorageUtil;
|
|
|
|
+
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
status.set("0");
|
|
status.set("0");
|
|
- if(inputInfo.getBeHospitalizedDoc() == null){
|
|
|
|
|
|
+ if (inputInfo.getBeHospitalizedDoc() == null) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
|
|
|
|
+ if (presentLabel == null || StringUtil.isBlank(presentLabel.getText())) {
|
|
|
|
+ status.set("0");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
List<String> clinicalList = (List<String>) specialStorageUtil.getJsonStringValue(KernelConstants.CONCEPT_CLINIC_BODYPART_PROPERTIES_LIST);
|
|
List<String> clinicalList = (List<String>) specialStorageUtil.getJsonStringValue(KernelConstants.CONCEPT_CLINIC_BODYPART_PROPERTIES_LIST);
|
|
- List<Clinical> clinicals = inputInfo.getBeHospitalizedDoc().getPresentLabel().getClinicals();
|
|
|
|
- if(clinicals.size()>0){
|
|
|
|
|
|
+ List<Clinical> clinicals = presentLabel.getClinicals();
|
|
|
|
+ if (clinicals.size() > 0) {
|
|
Clinical clinical = clinicals.get(0);
|
|
Clinical clinical = clinicals.get(0);
|
|
- if(clinicalList.contains(clinical.getName())){
|
|
|
|
|
|
+ if (clinicalList.contains(clinical.getName())) {
|
|
BodyPart bodyPart = clinical.getBodyPart();
|
|
BodyPart bodyPart = clinical.getBodyPart();
|
|
- if(bodyPart == null){
|
|
|
|
|
|
+ if (bodyPart == null) {
|
|
status.set("-1");
|
|
status.set("-1");
|
|
info.set(clinical.getName());
|
|
info.set(clinical.getName());
|
|
}
|
|
}
|