diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/LiquidEngine.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/LiquidEngine.java index 04831b3ce..f043a8677 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/LiquidEngine.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/LiquidEngine.java @@ -405,11 +405,11 @@ public class LiquidEngine implements IEvaluationContext { } @Override - public Base resolveReference(Object appContext, String url) throws FHIRException { + public Base resolveReference(Object appContext, String url, Base refContext) throws FHIRException { if (externalHostServices == null) return null; LiquidEngineContext ctxt = (LiquidEngineContext) appContext; - return resolveReference(ctxt.externalContext, url); + return resolveReference(ctxt.externalContext, url, refContext); } @Override diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java index 11827832b..a9ca48523 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java @@ -198,7 +198,7 @@ public class StructureMapUtilities { } @Override - public Base resolveReference(Object appContext, String url) throws FHIRException { + public Base resolveReference(Object appContext, String url, Base refContext) throws FHIRException { if (services == null) return null; return services.resolveReference(appContext, url); diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java index 485ee08ce..79bfc1180 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java @@ -77,7 +77,7 @@ public class FHIRPathTests { } @Override - public Base resolveReference(Object appContext, String url) throws FHIRException { + public Base resolveReference(Object appContext, String url, Base refContext) throws FHIRException { throw new NotImplementedException("Not done yet (FHIRPathTestEvaluationServices.resolveReference), when item is element"); } diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java index 7f134c8cf..9699e7b83 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/SnapShotGenerationTests.java @@ -346,7 +346,7 @@ public class SnapShotGenerationTests { } @Override - public Base resolveReference(Object appContext, String url) { + public Base resolveReference(Object appContext, String url, Base refContext) { // TODO Auto-generated method stub return null; } @@ -468,14 +468,23 @@ public class SnapShotGenerationTests { private void testGen(boolean fail) throws Exception { if (!Utilities.noString(test.register)) { - ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(), null, null); + List messages = new ArrayList(); + ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(), messages, null); pu.setNewSlicingProcessing(true); - List errors = new ArrayList(); pu.setIds(test.included, false); StructureDefinition base = TestingUtilities.context().fetchResource(StructureDefinition.class, test.included.getBaseDefinition()); pu.generateSnapshot(base, test.included, test.included.getUrl(), "http://test.org/profile", test.included.getName()); if (!TestingUtilities.context().hasResource(StructureDefinition.class, test.included.getUrl())) TestingUtilities.context().cacheResource(test.included); + int ec = 0; + for (ValidationMessage vm : messages) { + if (vm.getLevel() == IssueSeverity.ERROR) { + System.out.println(vm.summary()); + ec++; + } + } + if (ec > 0) + throw new FHIRException("register gen failed: "+messages.toString()); } StructureDefinition base = getSD(test.getSource().getBaseDefinition()); if (!base.getUrl().equals(test.getSource().getBaseDefinition())) diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java index 4e7fbd449..6dee8ba30 100644 --- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java +++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java @@ -380,7 +380,7 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour } @Override - public Base resolveReference(Object appContext, String url) { + public Base resolveReference(Object appContext, String url, Base refContext) { if (url.equals("Patient/test")) return new Patient(); return null;