|
@@ -32,6 +32,10 @@ public class BEH02909 extends QCCatalogue {
|
|
status.set("0");
|
|
status.set("0");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ /*if (drugsCurrentlyInUse.contains("见现病史")) {
|
|
|
|
+ status.set("0");
|
|
|
|
+ return;
|
|
|
|
+ }*/
|
|
/*List<String> drug = getDrug(drugsCurrentlyInUse);*/
|
|
/*List<String> drug = getDrug(drugsCurrentlyInUse);*/
|
|
PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
|
|
PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
|
|
if (presentLabel == null) {
|
|
if (presentLabel == null) {
|
|
@@ -50,7 +54,7 @@ public class BEH02909 extends QCCatalogue {
|
|
for (Medicine medicine : medicines) {
|
|
for (Medicine medicine : medicines) {
|
|
/* 现病史中一般情况之后的药品名称,并且不包含不详 */
|
|
/* 现病史中一般情况之后的药品名称,并且不包含不详 */
|
|
if (presentText.indexOf(medicine.getName()) > lastGeneralIndex && !medicine.getName().contains("不详")) {
|
|
if (presentText.indexOf(medicine.getName()) > lastGeneralIndex && !medicine.getName().contains("不详")) {
|
|
- drugFromPresent.add(medicine.getName());
|
|
|
|
|
|
+ drugFromPresent.add(medicine.getName().replaceAll("[“”药物]",""));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -58,18 +62,33 @@ public class BEH02909 extends QCCatalogue {
|
|
if (drugFromPresent.size() == 0) {
|
|
if (drugFromPresent.size() == 0) {
|
|
status.set("0");
|
|
status.set("0");
|
|
} else {
|
|
} else {
|
|
|
|
+ String infoStr = "";
|
|
int matchSum = 0;
|
|
int matchSum = 0;
|
|
for (String drug : drugFromPresent) {
|
|
for (String drug : drugFromPresent) {
|
|
if (drugsCurrentlyInUse.contains(drug)) {
|
|
if (drugsCurrentlyInUse.contains(drug)) {
|
|
matchSum++;
|
|
matchSum++;
|
|
|
|
+ } else {
|
|
|
|
+ infoStr = concatInfo(infoStr,drug);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ info.set(infoStr);
|
|
if (matchSum == drugFromPresent.size()) {
|
|
if (matchSum == drugFromPresent.size()) {
|
|
status.set("0");
|
|
status.set("0");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private String concatInfo(String infoStr, String drug) {
|
|
|
|
+ if (StringUtil.isBlank(infoStr)) {
|
|
|
|
+ infoStr += drug;
|
|
|
|
+ } else {
|
|
|
|
+ if (!infoStr.contains(drug)) {
|
|
|
|
+ infoStr += "," + drug;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return infoStr;
|
|
|
|
+ }
|
|
|
|
+
|
|
private List<String> getDrug(String drugsCurrentlyInUse) {
|
|
private List<String> getDrug(String drugsCurrentlyInUse) {
|
|
List<String> drugs = new ArrayList<>();
|
|
List<String> drugs = new ArrayList<>();
|
|
String medicine = "药物名称", usage = "用法", continueUse = "本次住院是否继续使用";
|
|
String medicine = "药物名称", usage = "用法", continueUse = "本次住院是否继续使用";
|