diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java index e7245bbcf..9cad656d9 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java @@ -60,13 +60,14 @@ public class StructureDefinitionValidator extends BaseValidator { private FHIRPathEngine fpe; private boolean wantCheckSnapshotUnchanged; - public StructureDefinitionValidator(IWorkerContext context, TimeTracker timeTracker, FHIRPathEngine fpe, boolean wantCheckSnapshotUnchanged, XVerExtensionManager xverManager, Coding jurisdiction) { + public StructureDefinitionValidator(IWorkerContext context, TimeTracker timeTracker, FHIRPathEngine fpe, boolean wantCheckSnapshotUnchanged, XVerExtensionManager xverManager, Coding jurisdiction, boolean forPublication) { super(context, xverManager); source = Source.InstanceValidator; this.fpe = fpe; this.timeTracker = timeTracker; this.wantCheckSnapshotUnchanged = wantCheckSnapshotUnchanged; this.jurisdiction = jurisdiction; + this.forPublication = forPublication; } public boolean validateStructureDefinition(List errors, Element src, NodeStack stack) { @@ -89,6 +90,7 @@ public class StructureDefinitionValidator extends BaseValidator { rule(errors, "2022-11-02", IssueType.NOTFOUND, stack.getLiteralPath(), sd.hasType() && sd.getType().equals(base.getType()), I18nConstants.SD_CONSTRAINED_TYPE_NO_MATCH, sd.getType(), base.getType()); List msgs = new ArrayList<>(); ProfileUtilities pu = new ProfileUtilities(context, msgs, null); + pu.setForPublication(forPublication); pu.setXver(xverManager); pu.setNewSlicingProcessing(!sd.hasFhirVersion() || VersionUtilities.isR4Plus(sd.getFhirVersion().toCode())); pu.generateSnapshot(base, sd, sd.getUrl(), "http://hl7.org/fhir/R4/", sd.getName()); @@ -121,7 +123,7 @@ public class StructureDefinitionValidator extends BaseValidator { I18nConstants.SD_DERIVATION_KIND_MISMATCH, base.getKindElement().primitiveValue(), src.getChildValue("kind")) && ok; } } - } catch (FHIRException | IOException e) { + } catch (Exception e) { rule(errors, NO_RULE_DATE, IssueType.EXCEPTION, stack.getLiteralPath(), false, I18nConstants.ERROR_GENERATING_SNAPSHOT, e.getMessage()); ok = false; } diff --git a/pom.xml b/pom.xml index 74b83fd4f..93fd970a7 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 6.4.1 - 1.3.6 + 1.3.7-SNAPSHOT 2.14.0 5.9.2 1.8.2