mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-09 06:14:45 +00:00
change type of error when value set circularity found
This commit is contained in:
parent
d74b0e2b4a
commit
4160d02bd1
@ -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
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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 ");
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user