|
@@ -7,16 +7,10 @@ import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
|
import com.lantone.qc.pub.model.doc.DeathRecordDoc;
|
|
|
import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
|
|
|
-import com.lantone.qc.pub.model.entity.Chief;
|
|
|
-import com.lantone.qc.pub.model.entity.General;
|
|
|
import com.lantone.qc.pub.model.label.ChiefLabel;
|
|
|
-import com.lantone.qc.pub.model.label.LeaveHospitalLabel;
|
|
|
-import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.regex.Matcher;
|
|
|
import java.util.regex.Pattern;
|
|
@@ -28,15 +22,17 @@ import java.util.regex.Pattern;
|
|
|
*/
|
|
|
@Component
|
|
|
public class LEA0149 extends QCCatalogue {
|
|
|
-
|
|
|
@Override
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
- status.set("0");
|
|
|
+ LeaveHospitalDoc leaveHospitalDoc = inputInfo.getLeaveHospitalDoc();
|
|
|
+ if (leaveHospitalDoc == null) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
DeathRecordDoc deathRecordDoc = inputInfo.getDeathRecordDoc();
|
|
|
if (deathRecordDoc == null || deathRecordDoc.getText() == null) {
|
|
|
- LeaveHospitalDoc leaveHospitalDoc = inputInfo.getLeaveHospitalDoc();
|
|
|
BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
|
|
|
- if (leaveHospitalDoc != null && beHospitalizedDoc != null) {
|
|
|
+ if (beHospitalizedDoc != null) {
|
|
|
Map<String, String> lhStructureMap = leaveHospitalDoc.getStructureMap();
|
|
|
ChiefLabel chiefLabel = beHospitalizedDoc.getChiefLabel();
|
|
|
if (lhStructureMap != null && chiefLabel != null) {
|
|
@@ -45,31 +41,31 @@ public class LEA0149 extends QCCatalogue {
|
|
|
String bhThings = lhStructureMap.get("入院情况");
|
|
|
|
|
|
//如果出院小结结构化数据能取出主诉,则直接用该主诉和入院记录主诉比较
|
|
|
- if (StringUtil.isNotBlank(leaveChief)){
|
|
|
- leaveChief = leaveChief.replaceAll("。","");
|
|
|
- if (bhChief.equals(leaveChief)){
|
|
|
+ if (StringUtil.isNotBlank(leaveChief)) {
|
|
|
+ leaveChief = leaveChief.replaceAll("。", "");
|
|
|
+ if (bhChief.equals(leaveChief)) {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
Pattern compile = Pattern.compile("(?<=2.).*(?=3.体格检查)");
|
|
|
Matcher matcher = compile.matcher(bhThings);
|
|
|
- while (matcher.find()){
|
|
|
+ while (matcher.find()) {
|
|
|
String number = matcher.group(0);
|
|
|
- if(CatalogueUtil.isEmpty(number)){
|
|
|
+ if (CatalogueUtil.isEmpty(number)) {
|
|
|
status.set("-1");
|
|
|
}
|
|
|
}
|
|
|
//处理台州的
|
|
|
- if(bhThings.contains("患者因")){
|
|
|
+ if (bhThings.contains("患者因")) {
|
|
|
status.set("0");
|
|
|
}
|
|
|
|
|
|
|
|
|
-// bhThings = bhThings.replaceAll("[\\p{Punct}\\pP]", "");
|
|
|
-// if (bhThings.indexOf(bhChief) < 0) {
|
|
|
-// status.set("-1");
|
|
|
-// }
|
|
|
+ // bhThings = bhThings.replaceAll("[\\p{Punct}\\pP]", "");
|
|
|
+ // if (bhThings.indexOf(bhChief) < 0) {
|
|
|
+ // status.set("-1");
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
}
|