Skip to content

Commit

Permalink
core 6.5.7 and #339
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveregger committed Jan 31, 2025
1 parent 0b359c1 commit 815162a
Show file tree
Hide file tree
Showing 25 changed files with 418 additions and 317 deletions.
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2025/01/31 Release 3.9.12

- Update org.hl7.fhir.core to 6.5.7
- Update hl7.terminology.r4 to 6.2.0 (note you need to update your application.yaml) [#339](https://github.com/ahdis/matchbox/issues/339)

2025/01/24 Release 3.9.11

- remove introduced FML limitation to R5 [#329](https://github.com/ahdis/matchbox/issues/329), [#331](https://github.com/ahdis/matchbox/issues/331) thanks @mrunibe for PR's !
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
public class MatchboxEngine extends ValidationEngine {

// Current packages that are provided with Matchbox Engine
public static final String PACKAGE_R4_TERMINOLOGY = "hl7.terminology.r4#6.1.0";
public static final String PACKAGE_R5_TERMINOLOGY = "hl7.terminology.r5#6.1.0";
public static final String PACKAGE_R4_TERMINOLOGY = "hl7.terminology.r4#6.2.0";
public static final String PACKAGE_R5_TERMINOLOGY = "hl7.terminology.r5#6.2.0";
public static final String PACKAGE_R4_UV_EXTENSIONS = "hl7.fhir.uv.extensions.r4#1.0.0";
public static final String PACKAGE_UV_EXTENSIONS = "hl7.fhir.uv.extensions#1.0.0";
public static final String PACKAGE_UV_XVER = "hl7.fhir.uv.xver#0.1.0@mb";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS
import org.hl7.fhir.utilities.filesystem.ManagedFileAccess;
import org.hl7.fhir.utilities.i18n.I18nBase;
import org.hl7.fhir.utilities.i18n.I18nConstants;
import org.hl7.fhir.utilities.i18n.subtag.LanguageSubtagRegistry;
import org.hl7.fhir.utilities.i18n.subtag.LanguageSubtagRegistryLoader;
import org.hl7.fhir.utilities.npm.NpmPackage;
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
Expand Down Expand Up @@ -318,6 +320,7 @@ public int compare(T arg1, T arg2) {
private final CanonicalResourceManager<NamingSystem> systems = new CanonicalResourceManager<NamingSystem>(false, minimalMemory);
private Map<String, NamingSystem> systemUrlMap;

private LanguageSubtagRegistry registry;

private UcumService ucumService;
protected Map<String, IByteProvider> binaries = new HashMap<String, IByteProvider>();
Expand Down Expand Up @@ -348,11 +351,13 @@ public int compare(T arg1, T arg2) {
protected BaseWorkerContext() throws FileNotFoundException, IOException, FHIRException {
setValidationMessageLanguage(getLocale());
clock = new TimeTracker();
initLang();
}

protected BaseWorkerContext(Locale locale) throws FileNotFoundException, IOException, FHIRException {
setValidationMessageLanguage(locale);
clock = new TimeTracker();
initLang();
}

protected BaseWorkerContext(CanonicalResourceManager<CodeSystem> codeSystems, CanonicalResourceManager<ValueSet> valueSets, CanonicalResourceManager<ConceptMap> maps, CanonicalResourceManager<StructureDefinition> profiles,
Expand All @@ -365,6 +370,13 @@ protected BaseWorkerContext(CanonicalResourceManager<CodeSystem> codeSystems, Ca
this.typeManager = new TypeManager(structures);
this.guides = guides;
clock = new TimeTracker();
initLang();
}

private void initLang() throws IOException {
registry = new LanguageSubtagRegistry();
LanguageSubtagRegistryLoader loader = new LanguageSubtagRegistryLoader(registry);
loader.loadFromDefaultResource();
}

protected void copy(BaseWorkerContext other) {
Expand Down Expand Up @@ -718,10 +730,8 @@ private boolean laterDelimitedVersion(String newVersion, String oldVersion, Stri
return laterVersion(newParts[i], oldParts[i]);
}
}
// MATCHBOX PATCH for allowing loading HL7 Terminology (THO)
return true;
// This should never happen
//throw new Error(formatMessage(I18nConstants.DELIMITED_VERSIONS_HAVE_EXACT_MATCH_FOR_DELIMITER____VS_, delimiter, newParts, oldParts));
// MATCHBOX PATCH for allowing loading HL7 Terminology (THO)
return true;
}

protected <T extends CanonicalResource> void seeMetadataResource(T r, Map<String, T> map, List<T> list, boolean addId) throws FHIRException {
Expand Down Expand Up @@ -775,6 +785,7 @@ public CodeSystem fetchCodeSystem(String system) {
}
CodeSystem cs;
synchronized (lock) {

cs = codeSystems.get(system);
}
if (cs == null && locator != null) {
Expand Down Expand Up @@ -1474,6 +1485,7 @@ public ValidationResult validateCode(final ValidationOptions optionsArg, String
} catch (TerminologyServiceProtectionException e) {
OperationOutcomeIssueComponent iss = new OperationOutcomeIssueComponent(org.hl7.fhir.r5.model.OperationOutcome.IssueSeverity.ERROR, e.getType());
iss.getDetails().setText(e.getMessage());
iss.setDiagnostics(e.getDiagnostics());
issues.add(iss);
return new ValidationResult(IssueSeverity.FATAL, e.getMessage(), e.getError(), issues);
} catch (Exception e) {
Expand Down Expand Up @@ -1624,11 +1636,11 @@ protected ValueSetExpander constructValueSetExpanderSimple(ValidationOptions opt
}

protected ValueSetValidator constructValueSetCheckerSimple(ValidationOptions options, ValueSet vs, ValidationContextCarrier ctxt) {
return new ValueSetValidator(this, new TerminologyOperationContext(this, options, "validation"), options, vs, ctxt, expParameters, terminologyClientManager);
return new ValueSetValidator(this, new TerminologyOperationContext(this, options, "validation"), options, vs, ctxt, expParameters, terminologyClientManager, registry);
}

protected ValueSetValidator constructValueSetCheckerSimple( ValidationOptions options, ValueSet vs) {
return new ValueSetValidator(this, new TerminologyOperationContext(this, options, "validation"), options, vs, expParameters, terminologyClientManager);
return new ValueSetValidator(this, new TerminologyOperationContext(this, options, "validation"), options, vs, expParameters, terminologyClientManager, registry);
}

protected Parameters constructParameters(ITerminologyOperationDetails opCtxt, TerminologyClientContext tcd, ValueSet vs, boolean hierarchical) {
Expand Down Expand Up @@ -1757,6 +1769,7 @@ public ValidationResult validateCode(ValidationOptions options, CodeableConcept
} catch (TerminologyServiceProtectionException e) {
OperationOutcomeIssueComponent iss = new OperationOutcomeIssueComponent(org.hl7.fhir.r5.model.OperationOutcome.IssueSeverity.ERROR, e.getType());
iss.getDetails().setText(e.getMessage());
iss.setDiagnostics(e.getDiagnostics());
issues.add(iss);
return new ValidationResult(IssueSeverity.FATAL, e.getMessage(), e.getError(), issues);
} catch (Exception e) {
Expand Down
Loading

0 comments on commit 815162a

Please sign in to comment.