private Drugx regimeDrugx(Tree drugT) { Drugx drugx = new Drugx(drugT); for (Tree t1 : drugT.getChildTs()) if (t1.isDose()) { drugx.setDose(new Dosex(t1)); } else if (t1.isApp()) { drugx.setApp(new Appx(t1)); } else if (t1.isDay()) { drugx.getDay().add(regimeDrugDay(t1)); } return drugx; }
public Tree getDrugDoseAppT() { if (isDose()) for (Tree doseAppT : this.getChildTs()) if (doseAppT.isApp()) return doseAppT; return null; }
public Tree getDrugAppT() { if (isDrug()) for (Tree appT : this.getChildTs()) if (appT.isApp()) return appT; return null; }