The validator currently treats value sets that contain exclude elements as ones where a code system cannot be determined. However, that's not appropriate. So long as there's only one *include* for the value set, the presence of excludes are irrelevant. For example, I have a value set that includes all specializations of code X, then explicitly excludes code X. There's only one include and only one system, so it's a perfectly appropriate value set to be bound to a 'code' extension. Stripping out the test that checks for excludes as irrelevant.

This commit is contained in:
Lloyd McKenzie 2020-04-03 23:20:33 -06:00
parent aef4404405
commit f6a5217d98
1 changed files with 0 additions and 2 deletions

View File

@ -235,8 +235,6 @@ public class ValueSetCheckerSimple implements ValueSetChecker {
private String getValueSetSystem() throws FHIRException { private String getValueSetSystem() throws FHIRException {
if (valueset == null) if (valueset == null)
throw new FHIRException(context.formatMessage(I18nConstants.UNABLE_TO_RESOLVE_SYSTEM__NO_VALUE_SET)); throw new FHIRException(context.formatMessage(I18nConstants.UNABLE_TO_RESOLVE_SYSTEM__NO_VALUE_SET));
if (valueset.getCompose().hasExclude())
throw new FHIRException(context.formatMessage(I18nConstants.UNABLE_TO_RESOLVE_SYSTEM__VALUE_SET_HAS_EXCLUDES));
if (valueset.getCompose().getInclude().size() == 0) { if (valueset.getCompose().getInclude().size() == 0) {
if (!valueset.hasExpansion() || valueset.getExpansion().getContains().size() == 0) if (!valueset.hasExpansion() || valueset.getExpansion().getContains().size() == 0)
throw new FHIRException(context.formatMessage(I18nConstants.UNABLE_TO_RESOLVE_SYSTEM__VALUE_SET_HAS_NO_INCLUDES_OR_EXPANSION)); throw new FHIRException(context.formatMessage(I18nConstants.UNABLE_TO_RESOLVE_SYSTEM__VALUE_SET_HAS_NO_INCLUDES_OR_EXPANSION));