|
@@ -6,6 +6,7 @@ import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.Map;
|
|
@@ -19,14 +20,32 @@ import java.util.Map;
|
|
|
@Component
|
|
|
public class FIRC0500 extends QCCatalogue {
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
- status.set("0");
|
|
|
FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
|
BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
|
|
|
- if(firstCourseRecordDoc != null && beHospitalizedDoc != null) {
|
|
|
- String chief_text = beHospitalizedDoc.getChiefLabel().getText();
|
|
|
- if(!firstCourseRecordDoc.getText().contains(chief_text)){
|
|
|
- status.set("-1");
|
|
|
+ if (firstCourseRecordDoc == null || beHospitalizedDoc == null) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ String chief_text = beHospitalizedDoc.getChiefLabel().getText();//入院记录主诉
|
|
|
+ if (StringUtil.isBlank(chief_text)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ chief_text = chief_text.replaceAll("[\\p{Punct}\\pP。]", "");
|
|
|
+
|
|
|
+ Map<String, String> structureMap = firstCourseRecordDoc.getStructureMap();
|
|
|
+ String firstCourseChief = structureMap.get("主诉");//首程结构化数据中取主诉
|
|
|
+
|
|
|
+ if (StringUtil.isNotBlank(firstCourseChief)) {
|
|
|
+ firstCourseChief = firstCourseChief.replaceAll("[\\p{Punct}\\pP。]", "");
|
|
|
+ if (firstCourseChief.equals(chief_text)) { //首程主诉.equals(入院记录主诉)
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
+ if (firstCourseRecordDoc.getText().contains(chief_text)) {
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+}
|