|
@@ -1,12 +1,19 @@
|
|
package com.lantone.qc.kernel.catalogue.firstcourserecord;
|
|
package com.lantone.qc.kernel.catalogue.firstcourserecord;
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
|
+import com.lantone.qc.kernel.client.ChiefPresentSimilarityServiceClient;
|
|
|
|
+import com.lantone.qc.kernel.structure.ai.ModelAI;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
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.doc.FirstCourseRecordDoc;
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
import com.lantone.qc.pub.model.entity.Diag;
|
|
import com.lantone.qc.pub.model.entity.Diag;
|
|
|
|
+import com.lantone.qc.pub.model.label.CaseCharacteristicLabel;
|
|
|
|
+import com.lantone.qc.pub.model.label.ChiefLabel;
|
|
import com.lantone.qc.pub.model.label.DiagLabel;
|
|
import com.lantone.qc.pub.model.label.DiagLabel;
|
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -20,22 +27,55 @@ import java.util.Map;
|
|
*/
|
|
*/
|
|
@Component
|
|
@Component
|
|
public class FIRC0087 extends QCCatalogue {
|
|
public class FIRC0087 extends QCCatalogue {
|
|
|
|
+ @Autowired
|
|
|
|
+ ChiefPresentSimilarityServiceClient chiefPresentSimilarityServiceClient;
|
|
|
|
+
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
status.set("0");
|
|
status.set("0");
|
|
FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
if(firstCourseRecordDoc != null){
|
|
if(firstCourseRecordDoc != null){
|
|
DiagLabel differentialDiagLabel = firstCourseRecordDoc.getDifferentialDiagLabel();
|
|
DiagLabel differentialDiagLabel = firstCourseRecordDoc.getDifferentialDiagLabel();
|
|
|
|
+ CaseCharacteristicLabel casecharLabel = firstCourseRecordDoc.getCaseCharacteristicLabel();
|
|
|
|
+ DiagLabel initDiagLabel = firstCourseRecordDoc.getInitialDiagLabel();
|
|
|
|
+
|
|
if(differentialDiagLabel != null){
|
|
if(differentialDiagLabel != null){
|
|
- List<Diag> diags = differentialDiagLabel.getDiags();
|
|
|
|
|
|
+// List<Diag> diags = differentialDiagLabel.getDiags();
|
|
|
|
+ String diag = initDiagLabel.getDiags().get(0).getHospitalDiagName();
|
|
|
|
+ String casechar = casecharLabel.getText();
|
|
|
|
+ String chief = casechar.substring(casechar.indexOf("主诉")+2, casechar.indexOf("现病史"));
|
|
|
|
+ String present = casechar.substring(casechar.indexOf("现病史")+3, casechar.indexOf("既往史"));
|
|
|
|
+
|
|
|
|
+ if (StringUtils.isNotEmpty(differentialDiagLabel.getText())
|
|
|
|
+ && (differentialDiagLabel.getText().contains("诊断明确")
|
|
|
|
+ || differentialDiagLabel.getText().contains("无需鉴别"))) {
|
|
|
|
+ if (chief.contains("术后") || chief.contains("孕") || chief.contains("化疗")
|
|
|
|
+ || chief.contains("肿瘤") || chief.contains("癌") || chief.contains("确诊")
|
|
|
|
+ || chief.contains("外伤") || chief.contains("摔伤")) {
|
|
|
|
+ status.set("0");
|
|
|
|
+ }
|
|
|
|
+ else if (present.contains(diag)) {
|
|
|
|
+ status.set("0");
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ status.set("-1");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else if (StringUtils.isEmpty(differentialDiagLabel.getText())) {
|
|
|
|
+ status.set("-1");
|
|
|
|
+ }
|
|
|
|
+ /*
|
|
if(diags == null || diags.size()<1){
|
|
if(diags == null || diags.size()<1){
|
|
status.set("-1");
|
|
status.set("-1");
|
|
}
|
|
}
|
|
|
|
+
|
|
if (StringUtils.isNotEmpty(differentialDiagLabel.getText())
|
|
if (StringUtils.isNotEmpty(differentialDiagLabel.getText())
|
|
&& (differentialDiagLabel.getText().contains("暂缺")
|
|
&& (differentialDiagLabel.getText().contains("暂缺")
|
|
|| differentialDiagLabel.getText().contains("无") || differentialDiagLabel.getText().contains("诊断"))) {
|
|
|| differentialDiagLabel.getText().contains("无") || differentialDiagLabel.getText().contains("诊断"))) {
|
|
status.set("0");
|
|
status.set("0");
|
|
}
|
|
}
|
|
|
|
+ */
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|