|
@@ -7,22 +7,8 @@ import com.diagbot.dto.WordCrfDTO;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.model.ai.process.*;
|
|
|
-import com.diagbot.model.entity.Diag;
|
|
|
-import com.diagbot.model.entity.GeneralDesc;
|
|
|
-import com.diagbot.model.entity.Lis;
|
|
|
-import com.diagbot.model.entity.Medicine;
|
|
|
-import com.diagbot.model.entity.Usual;
|
|
|
-import com.diagbot.model.entity.Vital;
|
|
|
-import com.diagbot.model.label.ChiefLabel;
|
|
|
-import com.diagbot.model.label.DiagLabel;
|
|
|
-import com.diagbot.model.label.FamilyLabel;
|
|
|
-import com.diagbot.model.label.MaritalLabel;
|
|
|
-import com.diagbot.model.label.MenstrualLabel;
|
|
|
-import com.diagbot.model.label.PacsLabel;
|
|
|
-import com.diagbot.model.label.PastLabel;
|
|
|
-import com.diagbot.model.label.PersonalLabel;
|
|
|
-import com.diagbot.model.label.PresentLabel;
|
|
|
-import com.diagbot.model.label.VitalLabel;
|
|
|
+import com.diagbot.model.entity.*;
|
|
|
+import com.diagbot.model.label.*;
|
|
|
import com.diagbot.util.Content;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
@@ -716,16 +702,16 @@ public class BeHospitalizedAI extends ModelAI {
|
|
|
* @param presentLabel
|
|
|
*/
|
|
|
public List<Medicine> takeMedicine(PresentLabel presentLabel){
|
|
|
- List<Medicine> takems = new ArrayList<>();
|
|
|
- List<GeneralDesc> generals = presentLabel.getGenerals();
|
|
|
+// List<Medicine> takems = new ArrayList<>();
|
|
|
+// List<GeneralDesc> generals = presentLabel.getGenerals();
|
|
|
List<Medicine> medicines = presentLabel.getMedicines();
|
|
|
- if (generals.size() > 0) {
|
|
|
+ /*if (generals.size() > 0) {
|
|
|
String presentText = presentLabel.getText();
|
|
|
if (StringUtils.isNotBlank(presentText) && medicines != null && medicines.size() > 0) {
|
|
|
String lastGeneral = generals.get(generals.size() - 1).getName();
|
|
|
int lastGeneralIndex = presentText.lastIndexOf(lastGeneral);
|
|
|
for (Medicine medicine : medicines) {
|
|
|
- /* 现病史中一般情况之后的药品名称,并且不包含不详 */
|
|
|
+ *//* 现病史中一般情况之后的药品名称,并且不包含不详 *//*
|
|
|
int medicine_index = presentText.indexOf(medicine.getName());
|
|
|
if (medicine_index > lastGeneralIndex && !medicine.getName().contains("不详")) {
|
|
|
takems.add(medicine);
|
|
@@ -733,6 +719,7 @@ public class BeHospitalizedAI extends ModelAI {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return takems;
|
|
|
+ return takems;*/
|
|
|
+ return medicines;
|
|
|
}
|
|
|
}
|