|
@@ -25,57 +25,56 @@ public class LEA0149 extends QCCatalogue {
|
|
|
@Override
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
LeaveHospitalDoc leaveHospitalDoc = inputInfo.getLeaveHospitalDoc();
|
|
|
- if (leaveHospitalDoc == null) {
|
|
|
+ BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
|
|
|
+ if (leaveHospitalDoc == null || beHospitalizedDoc == null) {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
DeathRecordDoc deathRecordDoc = inputInfo.getDeathRecordDoc();
|
|
|
- if (deathRecordDoc == null || deathRecordDoc.getText() == null) {
|
|
|
- BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
|
|
|
- if (beHospitalizedDoc != null) {
|
|
|
- Map<String, String> lhStructureMap = leaveHospitalDoc.getStructureMap();
|
|
|
- ChiefLabel chiefLabel = beHospitalizedDoc.getChiefLabel();
|
|
|
- if (lhStructureMap != null && chiefLabel != null) {
|
|
|
- String bhChief = CatalogueUtil.int2ChineseNum(chiefLabel.getText().replaceAll("[\\p{Punct}\\pP。-]", ""));
|
|
|
- String leaveChief = lhStructureMap.get("主诉");
|
|
|
- String bhThings = lhStructureMap.get("入院情况");
|
|
|
- if (StringUtil.isNotBlank(bhThings)){
|
|
|
- bhThings = CatalogueUtil.int2ChineseNum(bhThings.replaceAll("[\\p{Punct}\\pP。-]", ""));
|
|
|
- }
|
|
|
-
|
|
|
- //如果出院小结结构化数据能取出主诉,则直接用该主诉和入院记录主诉比较
|
|
|
- if (StringUtil.isNotBlank(leaveChief)) {
|
|
|
- leaveChief = leaveChief.replaceAll("[\\p{Punct}\\pP。-]", "");
|
|
|
- if (bhChief.equals(leaveChief)) {
|
|
|
- status.set("0");
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- if (StringUtil.isNotBlank(bhThings) && bhThings.replace(" ","").contains(bhChief.replace(" ",""))) {
|
|
|
- status.set("0");
|
|
|
- return;
|
|
|
- }
|
|
|
- Pattern compile = Pattern.compile("(?<=2.).*(?=3.体格检查)");
|
|
|
- Matcher matcher = compile.matcher(bhThings);
|
|
|
- while (matcher.find()) {
|
|
|
- String number = matcher.group(0);
|
|
|
- if (CatalogueUtil.isEmpty(number)) {
|
|
|
- status.set("-1");
|
|
|
- }
|
|
|
- }
|
|
|
- //处理台州的
|
|
|
- if (bhThings.contains("患者因")) {
|
|
|
- status.set("0");
|
|
|
- }
|
|
|
-
|
|
|
+ if (deathRecordDoc != null) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Map<String, String> lhStructureMap = leaveHospitalDoc.getStructureMap();
|
|
|
+ ChiefLabel chiefLabel = beHospitalizedDoc.getChiefLabel();
|
|
|
+ if (lhStructureMap != null && chiefLabel != null) {
|
|
|
+ String bhChief = CatalogueUtil.int2ChineseNum(chiefLabel.getText().replaceAll("[\\p{Punct}\\pP。-]", ""));
|
|
|
+ String leaveChief = lhStructureMap.get("主诉");
|
|
|
+ String bhThings = lhStructureMap.get("入院情况");
|
|
|
+ if (StringUtil.isNotBlank(bhThings)) {
|
|
|
+ bhThings = CatalogueUtil.int2ChineseNum(bhThings.replaceAll("[\\p{Punct}\\pP。-]", ""));
|
|
|
+ }
|
|
|
|
|
|
- // bhThings = bhThings.replaceAll("[\\p{Punct}\\pP]", "");
|
|
|
- // if (bhThings.indexOf(bhChief) < 0) {
|
|
|
- // status.set("-1");
|
|
|
- // }
|
|
|
+ //如果出院小结结构化数据能取出主诉,则直接用该主诉和入院记录主诉比较
|
|
|
+ if (StringUtil.isNotBlank(leaveChief)) {
|
|
|
+ leaveChief = leaveChief.replaceAll("[\\p{Punct}\\pP。-]", "");
|
|
|
+ if (bhChief.equals(leaveChief)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ if (StringUtil.isNotBlank(bhThings) && bhThings.replace(" ", "").contains(bhChief.replace(" ", ""))) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Pattern compile = Pattern.compile("(?<=2.).*(?=3.体格检查)");
|
|
|
+ Matcher matcher = compile.matcher(bhThings);
|
|
|
+ while (matcher.find()) {
|
|
|
+ String number = matcher.group(0);
|
|
|
+ if (CatalogueUtil.isEmpty(number)) {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //处理台州的
|
|
|
+ if (bhThings.contains("患者因")) {
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
+ // bhThings = bhThings.replaceAll("[\\p{Punct}\\pP]", "");
|
|
|
+ // if (bhThings.indexOf(bhChief) < 0) {
|
|
|
+ // status.set("-1");
|
|
|
+ // }
|
|
|
+ }
|
|
|
}
|
|
|
}
|