mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-12 15:54:44 +00:00
Issue #189 - improve Questionnaire error message
This commit is contained in:
parent
b2f24f5031
commit
b3c8cae61d
@ -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_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_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_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
|
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_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})
|
Reference_REF_BadTargetType = Invalid Resource target type. Found {0}, but expected one of ({1})
|
||||||
|
@ -95,7 +95,7 @@ public class QuestionnaireValidator extends BaseValidator {
|
|||||||
Element tgt = getQuestionById(item, ql);
|
Element tgt = getQuestionById(item, ql);
|
||||||
if (rule(errors, IssueType.BUSINESSRULE, ns.getLiteralPath(), tgt == null, I18nConstants.QUESTIONNAIRE_Q_ENABLEWHEN_ISINNER)) {
|
if (rule(errors, IssueType.BUSINESSRULE, ns.getLiteralPath(), tgt == null, I18nConstants.QUESTIONNAIRE_Q_ENABLEWHEN_ISINNER)) {
|
||||||
tgt = getQuestionById(questionnaire, ql);
|
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 (rule(errors, IssueType.BUSINESSRULE, ns.getLiteralPath(), tgt != item, I18nConstants.QUESTIONNAIRE_Q_ENABLEWHEN_SELF)) {
|
||||||
if (!isBefore(item, tgt, parents)) {
|
if (!isBefore(item, tgt, parents)) {
|
||||||
warning(errors, IssueType.BUSINESSRULE, ns.getLiteralPath(), false, I18nConstants.QUESTIONNAIRE_Q_ENABLEWHEN_AFTER, ql);
|
warning(errors, IssueType.BUSINESSRULE, ns.getLiteralPath(), false, I18nConstants.QUESTIONNAIRE_Q_ENABLEWHEN_AFTER, ql);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user