From 56e4f5b756bed182b8fcf0a21257ab63937895e1 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 6 Aug 2020 07:39:29 +1000 Subject: [PATCH] work on comparison functionality --- .../main/java/org/hl7/fhir/validation/Validator.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/Validator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/Validator.java index 8ea219d5b..54933851f 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/Validator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/Validator.java @@ -161,11 +161,13 @@ public class Validator { System.out.println("Specified destination (-dest parameter) is not valid: \"" + dest + "\")"); else { // first, prepare the context - String txLog = Params.getTerminologyServerLog(args); - String v = Common.getVersion(args); - String definitions = VersionUtilities.packageForVersion(v) + "#" + v; - ValidationEngine validator = Common.getValidationEngine(v, definitions, txLog); - Params.checkIGFileReferences(args); + cliContext = Params.loadCliContext(args); + if (cliContext.getSv() == null) { + cliContext.setSv(determineVersion(cliContext)); + } + String v = VersionUtilities.getCurrentVersion(cliContext.getSv()); + String definitions = VersionUtilities.packageForVersion(v) + "#" + v; + ValidationEngine validator = ValidationService.getValidator(cliContext, definitions); ComparisonService.doLeftRightComparison(args, dest, validator); } } else {