fix NPE in QuestionnaireRenderer
This commit is contained in:
parent
227d1cd94b
commit
f508f7279a
|
@ -290,7 +290,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
||||||
if (i.hasAnswerValueSet()) {
|
if (i.hasAnswerValueSet()) {
|
||||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||||
defn.getPieces().add(gen.new Piece(null, "Value Set: ", null));
|
defn.getPieces().add(gen.new Piece(null, "Value Set: ", null));
|
||||||
if (i.getAnswerValueSet().startsWith("#")) {
|
if (!Utilities.noString(i.getAnswerValueSet()) && i.getAnswerValueSet().startsWith("#")) {
|
||||||
ValueSet vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
ValueSet vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
||||||
if (vs == null) {
|
if (vs == null) {
|
||||||
defn.getPieces().add(gen.new Piece(null, i.getAnswerValueSet(), null));
|
defn.getPieces().add(gen.new Piece(null, i.getAnswerValueSet(), null));
|
||||||
|
@ -469,7 +469,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
||||||
if (i.hasAnswerValueSet()) {
|
if (i.hasAnswerValueSet()) {
|
||||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||||
defn.getPieces().add(gen.new Piece(null, "Value Set: ", null));
|
defn.getPieces().add(gen.new Piece(null, "Value Set: ", null));
|
||||||
if (i.getAnswerValueSet().startsWith("#")) {
|
if (Utilities.noString(i.getAnswerValueSet()) && i.getAnswerValueSet().startsWith("#")) {
|
||||||
ValueSet vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
ValueSet vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
||||||
if (vs == null) {
|
if (vs == null) {
|
||||||
defn.getPieces().add(gen.new Piece(null, i.getAnswerValueSet(), null));
|
defn.getPieces().add(gen.new Piece(null, i.getAnswerValueSet(), null));
|
||||||
|
@ -703,7 +703,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
||||||
}
|
}
|
||||||
if (i.hasAnswerValueSet()) {
|
if (i.hasAnswerValueSet()) {
|
||||||
XhtmlNode ans = item(ul, "Answers");
|
XhtmlNode ans = item(ul, "Answers");
|
||||||
if (i.getAnswerValueSet().startsWith("#")) {
|
if (Utilities.noString(i.getAnswerValueSet()) && i.getAnswerValueSet().startsWith("#")) {
|
||||||
ValueSet vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
ValueSet vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
||||||
if (vs == null) {
|
if (vs == null) {
|
||||||
ans.tx(i.getAnswerValueSet());
|
ans.tx(i.getAnswerValueSet());
|
||||||
|
@ -792,7 +792,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
||||||
private void listOptions(Questionnaire q, QuestionnaireItemComponent i, XhtmlNode select) {
|
private void listOptions(Questionnaire q, QuestionnaireItemComponent i, XhtmlNode select) {
|
||||||
if (i.hasAnswerValueSet()) {
|
if (i.hasAnswerValueSet()) {
|
||||||
ValueSet vs = null;
|
ValueSet vs = null;
|
||||||
if (i.getAnswerValueSet().startsWith("#")) {
|
if (Utilities.noString(i.getAnswerValueSet()) && i.getAnswerValueSet().startsWith("#")) {
|
||||||
vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
||||||
if (vs != null && !vs.hasUrl()) {
|
if (vs != null && !vs.hasUrl()) {
|
||||||
vs = vs.copy();
|
vs = vs.copy();
|
||||||
|
|
Loading…
Reference in New Issue