diff --git a/rabbitinahat/src/main/java/org/ohdsi/rabbitInAHat/ETLMarkupDocumentGenerator.java b/rabbitinahat/src/main/java/org/ohdsi/rabbitInAHat/ETLMarkupDocumentGenerator.java index eb418fdb..48a4ab36 100644 --- a/rabbitinahat/src/main/java/org/ohdsi/rabbitInAHat/ETLMarkupDocumentGenerator.java +++ b/rabbitinahat/src/main/java/org/ohdsi/rabbitInAHat/ETLMarkupDocumentGenerator.java @@ -133,11 +133,20 @@ private void addTargetTableSection(Table targetTable) throws InvalidFormatExcept comment.append(fieldToFieldMap.getComment().trim()); } } + for (Field field : targetTable.getFields()) { + if (field.getName().equals(targetField.getName())) { + if (comment.length() != 0) + comment.append("\n"); + comment.append(field.getComment().trim()); + } + } row.add("Source field", source.toString().trim()); row.add("Logic", logic.toString().trim()); row.add("Comment field", comment.toString().trim()); rows.add(row); } + + document.addTable(rows); } }