diff --git a/proms-resources/backend/src/main/java/io/uhndata/cards/proms/internal/serialize/ToEpicFormProcessor.java b/proms-resources/backend/src/main/java/io/uhndata/cards/proms/internal/serialize/ToEpicFormProcessor.java index d837616b0c..bcb3894709 100644 --- a/proms-resources/backend/src/main/java/io/uhndata/cards/proms/internal/serialize/ToEpicFormProcessor.java +++ b/proms-resources/backend/src/main/java/io/uhndata/cards/proms/internal/serialize/ToEpicFormProcessor.java @@ -115,7 +115,8 @@ public JsonValue processChild(Node node, Node child, JsonValue input, Function ValueType.OBJECT.equals(value.getValueType())) .map(JsonValue::asJsonObject) .filter(value -> value.containsKey("jcr:primaryType") - && "cards:IdMapping".equals(value.getString("jcr:primaryType"))) + && "cards:ExternalLink".equals(value.getString("jcr:primaryType")) + && "epic".equals(value.getString("label"))) .map(value -> value.getString("value")) .findFirst().orElse(""); answersObj.add("linkId", "|" + questionId); @@ -167,7 +168,8 @@ public void leave(Node node, JsonObjectBuilder json, Function s String questionnaireId = questionnaire.getIdentifier(); for (NodeIterator i = questionnaire.getNodes(); i.hasNext();) { Node child = i.nextNode(); - if ("cards:IdMapping".equals(child.getPrimaryNodeType().getName())) { + if ("cards:ExternalLink".equals(child.getPrimaryNodeType().getName()) + && "epic".equals(child.getProperty("label").getString())) { questionnaireId = child.getProperty("value").getString(); } }