|
@@ -430,6 +430,7 @@ public class StructureAnalyze {
|
|
break;
|
|
break;
|
|
case Constants.word_property_diagnose:
|
|
case Constants.word_property_diagnose:
|
|
case Constants.word_property_med:
|
|
case Constants.word_property_med:
|
|
|
|
+ case Constants.word_property_med_com:
|
|
case Constants.word_property_treat:
|
|
case Constants.word_property_treat:
|
|
current = updateClinicalInfo(outputInfo, lexeme.getText(), lexeme.getProperty());
|
|
current = updateClinicalInfo(outputInfo, lexeme.getText(), lexeme.getProperty());
|
|
updated = true;
|
|
updated = true;
|
|
@@ -603,12 +604,12 @@ public class StructureAnalyze {
|
|
Cause cause = new Cause();
|
|
Cause cause = new Cause();
|
|
cause.setCauseName(name);
|
|
cause.setCauseName(name);
|
|
|
|
|
|
-// if (current instanceof Symptom) {
|
|
|
|
-// symptom = (Symptom)current;
|
|
|
|
-// }
|
|
|
|
-// else {
|
|
|
|
|
|
+ if (current instanceof Symptom) {
|
|
|
|
+ symptom = (Symptom)current;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
symptom = outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1);
|
|
symptom = outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1);
|
|
-// }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
if (symptom.getCause() != null) {
|
|
if (symptom.getCause() != null) {
|
|
if (!outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1).getSymptomName().equals(symptom.getSymptomName())) {
|
|
if (!outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1).getSymptomName().equals(symptom.getSymptomName())) {
|
|
@@ -635,10 +636,14 @@ public class StructureAnalyze {
|
|
// symptom = outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1);
|
|
// symptom = outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1);
|
|
}
|
|
}
|
|
|
|
|
|
- else if (symptom.getDegree() != null) {
|
|
|
|
- if (!outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1).getSymptomName().equals(symptom.getSymptomName())) {
|
|
|
|
- outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1).setSymptomName(symptom.getSymptomName());
|
|
|
|
- symptom = outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1);
|
|
|
|
|
|
+ else if (current instanceof Symptom) {
|
|
|
|
+ symptom = (Symptom)current;
|
|
|
|
+
|
|
|
|
+ if (symptom.getDegree() != null) {
|
|
|
|
+ if (!outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1).getSymptomName().equals(symptom.getSymptomName())) {
|
|
|
|
+ outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1).setSymptomName(symptom.getSymptomName());
|
|
|
|
+ symptom = outputInfo.getSymptoms().get(outputInfo.getSymptoms().size() - 1);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
symptom.setDegree(degree);
|
|
symptom.setDegree(degree);
|
|
|
|
|
|
@@ -698,6 +703,7 @@ public class StructureAnalyze {
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case Constants.word_property_med:
|
|
case Constants.word_property_med:
|
|
|
|
+ case Constants.word_property_med_com:
|
|
if (current_treat instanceof Past || current instanceof Past) {
|
|
if (current_treat instanceof Past || current instanceof Past) {
|
|
if (current_treat instanceof Past) {
|
|
if (current_treat instanceof Past) {
|
|
past = (Past) current_treat;
|
|
past = (Past) current_treat;
|