fix error processing nucc locally

This commit is contained in:
Grahame Grieve 2023-04-21 18:53:03 +08:00
parent fe86ab1d7c
commit 1498823d5f
2 changed files with 8 additions and 3 deletions

View File

@ -359,8 +359,13 @@ public class ValueSetCheckerSimple extends ValueSetWorker implements ValueSetChe
}
if (!inExpansion) {
if (valueset != null && valueset.hasExpansion()) {
String msg = context.formatMessage(I18nConstants.CODESYSTEM_CS_UNK_EXPANSION, valueset.getUrl(), code.getCode().toString(), code.getSystem());
return new ValidationResult(IssueSeverity.ERROR, msg, makeIssue(IssueSeverity.ERROR, IssueType.NOTFOUND, path, msg));
String msg = context.formatMessage(I18nConstants.CODESYSTEM_CS_UNK_EXPANSION,
valueset.getUrl(),
code.getSystem(),
code.getCode().toString());
List<OperationOutcomeIssueComponent> issues = new ArrayList<>();
issues.addAll(makeIssue(IssueSeverity.ERROR, IssueType.NOTFOUND, path, msg));
throw new VSCheckerException(msg, issues);
} else {
List<OperationOutcomeIssueComponent> issues = new ArrayList<>();
issues.addAll(makeIssue(IssueSeverity.ERROR, IssueType.NOTFOUND, path+".system", warningMessage));

View File

@ -720,7 +720,7 @@ SD_VALUE_TYPE_IILEGAL = The element {0} has a {1} of type {2}, which is not in t
SD_VALUE_TYPE_REPEAT_HINT = The repeating element has a {1}. The {1} will apply to all the repeats (this has not been clear to all users)
SD_VALUE_TYPE_REPEAT_WARNING_DOTNET = The repeating element has a {1} value for a primitive type. The DotNet validator will not apply this to all the repeats - this is an error
SD_NO_TYPES_OR_CONTENTREF = The element {0} has no assigned types, and no content reference
CODESYSTEM_CS_UNK_EXPANSION = The code provided ({2}) is not in the value set {0}, and a code is required from this value set. The system {1} is unknown.
CODESYSTEM_CS_UNK_EXPANSION = The code provided ({2}) is not in the expansion in the value set {0}, and a code is required from this value set. The system {1} is unknown.
BUNDLE_SEARCH_NOSELF = SearchSet Bundles should have a self link that specifies what the search was
BUNDLE_SEARCH_SELF_NOT_UNDERSTOOD = No types could be determined from the search string, so the types can''t be checked
BUNDLE_SEARCH_ENTRY_NO_RESOURCE = SearchSet Bundle Entries must have resources