increase checking on snapshot generation when validating profiles
This commit is contained in:
parent
4dc9580c90
commit
96d9581669
|
@ -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<ValidationMessage> 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<ValidationMessage> 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;
|
||||
}
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -19,7 +19,7 @@
|
|||
|
||||
<properties>
|
||||
<hapi_fhir_version>6.4.1</hapi_fhir_version>
|
||||
<validator_test_case_version>1.3.6</validator_test_case_version>
|
||||
<validator_test_case_version>1.3.7-SNAPSHOT</validator_test_case_version>
|
||||
<jackson_version>2.14.0</jackson_version>
|
||||
<junit_jupiter_version>5.9.2</junit_jupiter_version>
|
||||
<junit_platform_launcher_version>1.8.2</junit_platform_launcher_version>
|
||||
|
|
Loading…
Reference in New Issue