Skip to content

Commit

Permalink
Improve slicing error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed Jan 5, 2024
1 parent c0f61b5 commit 85435f3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1098,4 +1098,7 @@ BUNDLE_BUNDLE_ENTRY_NOTFOUND_FRAGMENT = Can''t find ''{0}'' in the bundle ({1})
BUNDLE_BUNDLE_ENTRY_FOUND_MULTIPLE_FRAGMENT = Found {0} matches for fragment {2} in resource ''{1}'' in the bundle ({3})
XHTML_IDREF_NOT_FOUND = The target of the HTML idref attribute ''{0}'' was not found in the resource
XHTML_IDREF_NOT_MULTIPLE_MATCHES = Multiple matching targets for the HTML idref attribute ''{0}'' were found in the resource
TX_GENERAL_CC_ERROR_MESSAGE = No valid coding was found for the value set ''{0}''
TX_GENERAL_CC_ERROR_MESSAGE = No valid coding was found for the value set ''{0}''
Validation_VAL_Profile_Minimum_SLICE_one = Slice ''{3}'': a matching slice is required, but not found (from {1}). Note that other slices are allowed in addition to this required slice
Validation_VAL_Profile_Minimum_SLICE_other = Slice ''{3}'': minimum required = {0}, but only found {7} (from {1})
FHIRPATH_UNKNOWN_EXTENSION = Reference to an unknown extension - double check that the URL ''{0}'' is correct
Original file line number Diff line number Diff line change
Expand Up @@ -841,3 +841,8 @@ VALUESET_SUPPLEMENT_MISSING_other =
BUNDLE_BUNDLE_ENTRY_NOTFOUND_APPARENT_one =
BUNDLE_BUNDLE_ENTRY_NOTFOUND_APPARENT_many =
BUNDLE_BUNDLE_ENTRY_NOTFOUND_APPARENT_other =
Validation_VAL_Profile_Minimum_SLICE_one =
Validation_VAL_Profile_Minimum_SLICE_many =
Validation_VAL_Profile_Minimum_SLICE_other =


Original file line number Diff line number Diff line change
Expand Up @@ -6566,8 +6566,10 @@ public boolean checkCardinalities(List<ValidationMessage> errors, StructureDefin
if (count < ed.getMin()) {
if (isObservationMagicValue(profile, ed)) {
ok = rule(errors, NO_RULE_DATE, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(), false, I18nConstants.VALIDATION_VAL_PROFILE_MINIMUM_MAGIC, ed.getSliceName(), getFixedLOINCCode(ed, profile), profile.getVersionedUrl()) && ok;
} else if (ed.hasSliceName()) {
ok = rulePlural(errors, NO_RULE_DATE, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(), false, ed.getMin(), I18nConstants.VALIDATION_VAL_PROFILE_MINIMUM_SLICE, profile.getVersionedUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), count) && ok;
} else {
ok = rulePlural(errors, NO_RULE_DATE, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(), false, count, I18nConstants.VALIDATION_VAL_PROFILE_MINIMUM, profile.getVersionedUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), Integer.toString(ed.getMin())) && ok;
ok = rulePlural(errors, NO_RULE_DATE, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(), false, count, I18nConstants.VALIDATION_VAL_PROFILE_MINIMUM, profile.getVersionedUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), ed.getMin()) && ok;
}
}
}
Expand Down

0 comments on commit 85435f3

Please sign in to comment.