diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java index ead0cf012..5e0dba77e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java @@ -709,8 +709,9 @@ public class QuestionnaireRenderer extends TerminologyRenderer { if (i.hasAnswerValueSet()) { ValueSet vs = null; if (i.getAnswerValueSet().startsWith("#")) { - vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1)).copy(); + vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1)); if (vs != null && !vs.hasUrl()) { + vs = vs.copy(); vs.setUrl("urn:uuid:"+UUID.randomUUID().toString().toLowerCase()); } } else {