fix for NPE rendering references to contained value setes in Questionnaires that don't resolve

This commit is contained in:
Grahame Grieve 2020-12-09 10:09:02 +11:00
parent 752918a80a
commit 655c072d64
1 changed files with 2 additions and 1 deletions

View File

@ -709,8 +709,9 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
if (i.hasAnswerValueSet()) { if (i.hasAnswerValueSet()) {
ValueSet vs = null; ValueSet vs = null;
if (i.getAnswerValueSet().startsWith("#")) { 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()) { if (vs != null && !vs.hasUrl()) {
vs = vs.copy();
vs.setUrl("urn:uuid:"+UUID.randomUUID().toString().toLowerCase()); vs.setUrl("urn:uuid:"+UUID.randomUUID().toString().toLowerCase());
} }
} else { } else {