diff --git a/org.hl7.fhir.utilities/src/main/resources/Messages.properties b/org.hl7.fhir.utilities/src/main/resources/Messages.properties index eddb6c610..70092ec8e 100644 --- a/org.hl7.fhir.utilities/src/main/resources/Messages.properties +++ b/org.hl7.fhir.utilities/src/main/resources/Messages.properties @@ -99,7 +99,7 @@ Questionnaire_QR_Q_NotFound = The questionnaire "{0}" could not be resolved, so Questionnaire_Q_EnableWhen_After = The target of this enableWhen rule ({0}) comes after the question itself Questionnaire_Q_EnableWhen_IsInner = Questions with an enableWhen cannot refer to an inner question for it''s enableWhen condition Questionnaire_Q_EnableWhen_NoLink = Questions with an enableWhen must have a value for the question link -Questionnaire_Q_EnableWhen_NoTarget = Unable to find target "{0}" for this question enableWhen +Questionnaire_Q_EnableWhen_NoTarget = Unable to find an item with the linkId "{0}" which is referenced in the enableWhen for "{1}" Questionnaire_Q_EnableWhen_Self = Target for this question enableWhen can''t reference itself Reference_REF_Aggregation = Reference is {0} which isn''t supported by the specified aggregation mode(s) for the reference Reference_REF_BadTargetType = Invalid Resource target type. Found {0}, but expected one of ({1}) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/QuestionnaireValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/QuestionnaireValidator.java index d54213efc..227d68f94 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/QuestionnaireValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/QuestionnaireValidator.java @@ -95,7 +95,7 @@ public class QuestionnaireValidator extends BaseValidator { Element tgt = getQuestionById(item, ql); if (rule(errors, IssueType.BUSINESSRULE, ns.getLiteralPath(), tgt == null, I18nConstants.QUESTIONNAIRE_Q_ENABLEWHEN_ISINNER)) { tgt = getQuestionById(questionnaire, ql); - if (rule(errors, IssueType.BUSINESSRULE, ns.getLiteralPath(), tgt != null, I18nConstants.QUESTIONNAIRE_Q_ENABLEWHEN_NOTARGET, ql)) { + if (rule(errors, IssueType.BUSINESSRULE, ns.getLiteralPath(), tgt != null, I18nConstants.QUESTIONNAIRE_Q_ENABLEWHEN_NOTARGET, ql, item.getChildValue("linkId"))) { if (rule(errors, IssueType.BUSINESSRULE, ns.getLiteralPath(), tgt != item, I18nConstants.QUESTIONNAIRE_Q_ENABLEWHEN_SELF)) { if (!isBefore(item, tgt, parents)) { warning(errors, IssueType.BUSINESSRULE, ns.getLiteralPath(), false, I18nConstants.QUESTIONNAIRE_Q_ENABLEWHEN_AFTER, ql);