treeModel.removeNodeFromParent(
(MutableTreeNode) pregnancyOutcomeNode.getChildAt(pregnancyOutcomeNotificationList.indexOf(notification)));
pregnancyOutcomeNotificationList.remove(notification);
pregnancyOutcomeNode.setUserObject("Pregnancy outcome" + "(" + pregnancyOutcomeNotificationList.size() + ")");
if (pregnancyOutcomeNotificationList.isEmpty()) {
treeModel.removeNodeFromParent(pregnancyOutcomeNode);
}
} else if (notification.getType() == Notification.Type.PREGNANCY) {
treeModel.removeNodeFromParent(
(MutableTreeNode) pregnancyNode.getChildAt(pregnancyNotificationList.indexOf(notification)));
pregnancyNotificationList.remove(notification);