change type of error when value set circularity found

This commit is contained in:
Grahame Grieve 2024-01-09 12:00:00 +11:00
parent d74b0e2b4a
commit 4160d02bd1
5 changed files with 7 additions and 3 deletions

View File

@ -17,3 +17,4 @@ major upgrade to validation - use terminology server to perform more logic, and
* IPS tool development
* Improved errors publishing IGs
* Refactor Context to support multiple terminology services
* change type of error when value set circularity found

View File

@ -77,7 +77,7 @@ public class TerminologyOperationContext {
public void seeContext(String context) {
if (contexts.contains(context)) {
throw new TerminologyServiceProtectionException(worker.formatMessage(I18nConstants.VALUESET_CIRCULAR_REFERENCE, context, contexts.toString()), TerminologyServiceErrorClass.BUSINESS_RULE, IssueType.BUSINESSRULE);
throw new TerminologyServiceProtectionException(worker.formatMessage(I18nConstants.VALUESET_CIRCULAR_REFERENCE, context, contexts.toString()), TerminologyServiceErrorClass.PROCESSING, IssueType.PROCESSING);
}
contexts.add(context);
}

View File

@ -1,7 +1,7 @@
package org.hl7.fhir.r5.terminologies.utilities;
public enum TerminologyServiceErrorClass {
UNKNOWN, NOSERVICE, SERVER_ERROR, VALUESET_UNSUPPORTED, CODESYSTEM_UNSUPPORTED, BLOCKED_BY_OPTIONS, INTERNAL_ERROR, BUSINESS_RULE, TOO_COSTLY;
UNKNOWN, NOSERVICE, SERVER_ERROR, VALUESET_UNSUPPORTED, CODESYSTEM_UNSUPPORTED, BLOCKED_BY_OPTIONS, INTERNAL_ERROR, BUSINESS_RULE, TOO_COSTLY, PROCESSING;
public boolean isInfrastructure() {
return this == NOSERVICE || this == SERVER_ERROR || this == VALUESET_UNSUPPORTED;

View File

@ -197,7 +197,7 @@ public class SchematronWriter extends TextStreamWriter {
private void addAllResourcesNote() throws IOException {
ln("<!-- ");
ln(" This file contains constraints for all resources");
ln(" Because of the way containment works, this file should always )");
ln(" Because of the way containment works, this file should always ");
ln(" be used for validating resources. Alternatively you can use ");
ln(" the resource specific files to build a smaller version of");
ln(" this file (the contents are identical; only include those ");

View File

@ -207,6 +207,9 @@ public class TerminologyServiceTests {
case TOO_COSTLY:
e.setCode(IssueType.TOOCOSTLY);
break;
case PROCESSING:
e.setCode(IssueType.PROCESSING);
break;
case UNKNOWN:
e.setCode(IssueType.UNKNOWN);
break;