|
@@ -395,6 +395,21 @@ public class StructureAnalyze {
|
|
|
num = "";
|
|
|
current = null;
|
|
|
}
|
|
|
+ else if (current_diag.length() > 0) {
|
|
|
+ if (outputInfo.getPasts() == null || outputInfo.getPasts().size() == 0) {
|
|
|
+ outputInfo.getPasts().add(new Past());
|
|
|
+ }
|
|
|
+ past = outputInfo.getPasts().get(outputInfo.getPasts().size() - 1);
|
|
|
+ past.setDiagnose(current_diag);
|
|
|
+ past.setPds(new ArrayList<>());
|
|
|
+ pd1 = new PD();
|
|
|
+ pd1.setValue(num);
|
|
|
+ pd1.setUnit(lexeme.getText());
|
|
|
+ past.getPds().add(pd1);
|
|
|
+
|
|
|
+ current = past;
|
|
|
+ current_diag = "";
|
|
|
+ }
|
|
|
else {
|
|
|
if (symptom.getTimestamp() == null) {
|
|
|
List<PD> pds1 = new ArrayList<>();
|
|
@@ -683,8 +698,13 @@ public class StructureAnalyze {
|
|
|
}
|
|
|
break;
|
|
|
case Constants.word_property_med:
|
|
|
- if (current_treat instanceof Past) {
|
|
|
- past = (Past)current_treat;
|
|
|
+ if (current_treat instanceof Past || current instanceof Past) {
|
|
|
+ if (current_treat instanceof Past) {
|
|
|
+ past = (Past) current_treat;
|
|
|
+ }
|
|
|
+ else if (current instanceof Past) {
|
|
|
+ past = (Past) current;
|
|
|
+ }
|
|
|
|
|
|
if (past.getTreatName() == null || past.getTreatName().trim().length() == 0) {
|
|
|
past.setTreatName(name);
|