diff --git a/src/main/java/de/uksh/medic/etl/OpenEhrObds.java b/src/main/java/de/uksh/medic/etl/OpenEhrObds.java index ff976a8..29e8601 100644 --- a/src/main/java/de/uksh/medic/etl/OpenEhrObds.java +++ b/src/main/java/de/uksh/medic/etl/OpenEhrObds.java @@ -97,6 +97,7 @@ public static void walkXmlTree(Set> xmlSet, int depth, Mapping m = Settings.getMapping().get(path); Map mapped = convertMdr(xmlSet, m); + mapped.values().removeIf(Objects::isNull); listConv(mapped); mapped.entrySet().forEach(e -> queryFhirTs(m, e)); Map result = formatMap((Map) mapped); @@ -159,7 +160,9 @@ private static void listConv(Map input) { case List l -> { } default -> { - e.setValue(List.of(e.getValue())); + List l = new ArrayList<>(); + l.add(e.getValue()); + e.setValue(l); } } });