Descendent fix (#5669)
* Fix "is-a" ValueSet expansion, add "descendent-of" support
* Fixed tests in DSTU3 and R5
* Trigger new build
* Revert "Trigger new build"
This reverts commit 46c672b338
.
* fix default partition setting on resource (#5617)
* fix default partition setting on resource
* changelog
* Handle DEFAULT partition in rule checker.
* Fix spotless
---------
Co-authored-by: Michael Buckley <michaelabuckley@gmail.com>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
* pom bump, doc add, version enum add (#5616)
Co-authored-by: Long Ma <long@smilecdr.com>
* fix default partition setting on resource (#5618)
* fix default partition setting on resource
* Handle DEFAULT partition in rule checker.
Co-authored-by: Ken Stevens <khstevens@gmail.com>
* Add setting to make broker not use JacksonMessageConverter (#5611)
* Add setting to make broker not use JacksonMessageConverter
* Add changelog
* Implement suggestions
---------
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
* Fix version
* add changelog, add attribution, remove accidental bring-overs
* add changelog, add attribution, remove accidental bring-overs
* Finish jira section
---------
Co-authored-by: Ole Hedegaard <ohe@trifork.com>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Michael Buckley <michaelabuckley@gmail.com>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
This commit is contained in:
parent
d63d3cab46
commit
ace3fccf31
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
type: fix
|
||||||
|
issue: 5603
|
||||||
|
jira: SMILE-8000
|
||||||
|
title: "Previously, the semantics of `is-a` were incorrect in Valueset Expansion. The implementation previously used the behaviour of `descendent-of`, which means that `A is-a A` was not being considered as true. This has been corrected. In addition,
|
||||||
|
`descendent-of` is now supported, which compares for strict descendency, and does not include itself. Thanks to Ole Hedegaard (@ohetrifork) for the fix."
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
release-date: "2023-05-18"
|
||||||
|
codename: "Borealis"
|
|
@ -1598,6 +1598,16 @@ public class TermReadSvcImpl implements ITermReadSvc, IHasScheduledJobs {
|
||||||
TermConcept code = findCodeForFilterCriteria(theSystem, theFilter);
|
TermConcept code = findCodeForFilterCriteria(theSystem, theFilter);
|
||||||
|
|
||||||
if (theFilter.getOp() == ValueSet.FilterOperator.ISA) {
|
if (theFilter.getOp() == ValueSet.FilterOperator.ISA) {
|
||||||
|
ourLog.debug(
|
||||||
|
" * Filtering on specific code and codes with a parent of {}/{}/{}",
|
||||||
|
code.getId(),
|
||||||
|
code.getCode(),
|
||||||
|
code.getDisplay());
|
||||||
|
|
||||||
|
b.must(f.bool()
|
||||||
|
.should(f.match().field("myParentPids").matching("" + code.getId()))
|
||||||
|
.should(f.match().field("myId").matching(code.getId())));
|
||||||
|
} else if (theFilter.getOp() == ValueSet.FilterOperator.DESCENDENTOF) {
|
||||||
ourLog.debug(
|
ourLog.debug(
|
||||||
" * Filtering on codes with a parent of {}/{}/{}", code.getId(), code.getCode(), code.getDisplay());
|
" * Filtering on codes with a parent of {}/{}/{}", code.getId(), code.getCode(), code.getDisplay());
|
||||||
|
|
||||||
|
|
|
@ -786,7 +786,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest impl
|
||||||
logAndValidateValueSet(result);
|
logAndValidateValueSet(result);
|
||||||
|
|
||||||
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
||||||
assertThat(codes, containsInAnyOrder("childAAA", "childAAB"));
|
assertThat(codes, containsInAnyOrder("childAA", "childAAA", "childAAB"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -313,7 +313,7 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test {
|
||||||
.setSystem(codeSystem.getUrl())
|
.setSystem(codeSystem.getUrl())
|
||||||
.addFilter()
|
.addFilter()
|
||||||
.setProperty("concept")
|
.setProperty("concept")
|
||||||
.setOp(FilterOperator.ISA)
|
.setOp(FilterOperator.DESCENDENTOF)
|
||||||
.setValue("dogs");
|
.setValue("dogs");
|
||||||
|
|
||||||
myValueSetDao.create(valueSet, mySrd);
|
myValueSetDao.create(valueSet, mySrd);
|
||||||
|
@ -504,7 +504,7 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test {
|
||||||
logAndValidateValueSet(result);
|
logAndValidateValueSet(result);
|
||||||
|
|
||||||
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
||||||
assertThat(codes, containsInAnyOrder("childAAA", "childAAB"));
|
assertThat(codes, containsInAnyOrder("childAA", "childAAA", "childAAB"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -535,7 +535,7 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test {
|
||||||
logAndValidateValueSet(result);
|
logAndValidateValueSet(result);
|
||||||
|
|
||||||
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
||||||
assertThat(codes, containsInAnyOrder("childAAA", "childAAB"));
|
assertThat(codes, containsInAnyOrder("childAA", "childAAA", "childAAB"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -650,7 +650,7 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test {
|
||||||
ValueSet vs = new ValueSet();
|
ValueSet vs = new ValueSet();
|
||||||
ConceptSetComponent include = vs.getCompose().addInclude();
|
ConceptSetComponent include = vs.getCompose().addInclude();
|
||||||
include.setSystem(URL_MY_CODE_SYSTEM);
|
include.setSystem(URL_MY_CODE_SYSTEM);
|
||||||
include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("ParentA");
|
include.addFilter().setProperty("concept").setOp(FilterOperator.DESCENDENTOF).setValue("ParentA");
|
||||||
|
|
||||||
ValueSet result = myValueSetDao.expand(vs, null);
|
ValueSet result = myValueSetDao.expand(vs, null);
|
||||||
logAndValidateValueSet(result);
|
logAndValidateValueSet(result);
|
||||||
|
@ -669,7 +669,7 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test {
|
||||||
vs = new ValueSet();
|
vs = new ValueSet();
|
||||||
include = vs.getCompose().addInclude();
|
include = vs.getCompose().addInclude();
|
||||||
include.setSystem(URL_MY_CODE_SYSTEM);
|
include.setSystem(URL_MY_CODE_SYSTEM);
|
||||||
include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("ParentA");
|
include.addFilter().setProperty("concept").setOp(FilterOperator.DESCENDENTOF).setValue("ParentA");
|
||||||
result = myValueSetDao.expand(vs, null);
|
result = myValueSetDao.expand(vs, null);
|
||||||
logAndValidateValueSet(result);
|
logAndValidateValueSet(result);
|
||||||
|
|
||||||
|
|
|
@ -230,7 +230,7 @@ public class ResourceProviderDstu3ValueSetVersionedTest extends BaseResourceProv
|
||||||
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
||||||
include.setSystem(theCodeSystemUrl);
|
include.setSystem(theCodeSystemUrl);
|
||||||
include.setVersion(theValueSetVersion);
|
include.setVersion(theValueSetVersion);
|
||||||
include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("ParentA");
|
include.addFilter().setProperty("concept").setOp(FilterOperator.DESCENDENTOF).setValue("ParentA");
|
||||||
return myLocalVs;
|
return myLocalVs;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -353,7 +353,7 @@ public class FhirResourceDaoR4TerminologyTest extends BaseJpaR4Test {
|
||||||
.setSystem(codeSystem.getUrl())
|
.setSystem(codeSystem.getUrl())
|
||||||
.addFilter()
|
.addFilter()
|
||||||
.setProperty("concept")
|
.setProperty("concept")
|
||||||
.setOp(FilterOperator.ISA)
|
.setOp(FilterOperator.DESCENDENTOF)
|
||||||
.setValue("dogs");
|
.setValue("dogs");
|
||||||
|
|
||||||
myValueSetDao.create(valueSet, mySrd);
|
myValueSetDao.create(valueSet, mySrd);
|
||||||
|
@ -584,7 +584,7 @@ public class FhirResourceDaoR4TerminologyTest extends BaseJpaR4Test {
|
||||||
logAndValidateValueSet(result);
|
logAndValidateValueSet(result);
|
||||||
|
|
||||||
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
||||||
assertThat(codes, containsInAnyOrder("childAAA", "childAAB"));
|
assertThat(codes, containsInAnyOrder("childAA", "childAAA", "childAAB"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -610,6 +610,34 @@ public class FhirResourceDaoR4TerminologyTest extends BaseJpaR4Test {
|
||||||
logAndValidateValueSet(result);
|
logAndValidateValueSet(result);
|
||||||
|
|
||||||
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
||||||
|
assertEquals(3, codes.size());
|
||||||
|
assertThat(codes, containsInAnyOrder("childAA", "childAAA", "childAAB"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExpandWithDescendentOfInExternalValueSetReindex() {
|
||||||
|
TermReindexingSvcImpl.setForceSaveDeferredAlwaysForUnitTest(true);
|
||||||
|
|
||||||
|
createExternalCsAndLocalVs();
|
||||||
|
|
||||||
|
myResourceReindexingSvc.markAllResourcesForReindexing();
|
||||||
|
myResourceReindexingSvc.forceReindexingPass();
|
||||||
|
myResourceReindexingSvc.forceReindexingPass();
|
||||||
|
myTerminologyDeferredStorageSvc.saveDeferred();
|
||||||
|
myTerminologyDeferredStorageSvc.saveDeferred();
|
||||||
|
myTerminologyDeferredStorageSvc.saveDeferred();
|
||||||
|
|
||||||
|
ValueSet vs = new ValueSet();
|
||||||
|
ConceptSetComponent include = vs.getCompose().addInclude();
|
||||||
|
include.setSystem(TermTestUtil.URL_MY_CODE_SYSTEM);
|
||||||
|
include.addFilter().setOp(FilterOperator.DESCENDENTOF).setValue("childAA").setProperty("concept");
|
||||||
|
|
||||||
|
ValueSet result = myValueSetDao.expand(vs, null); // breakpoint
|
||||||
|
logAndValidateValueSet(result);
|
||||||
|
|
||||||
|
ArrayList<String> codes = toCodesContains(result.getExpansion().getContains());
|
||||||
|
assertEquals(2, codes.size());
|
||||||
assertThat(codes, containsInAnyOrder("childAAA", "childAAB"));
|
assertThat(codes, containsInAnyOrder("childAAA", "childAAB"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -795,7 +823,7 @@ public class FhirResourceDaoR4TerminologyTest extends BaseJpaR4Test {
|
||||||
ValueSet vs = new ValueSet();
|
ValueSet vs = new ValueSet();
|
||||||
ConceptSetComponent include = vs.getCompose().addInclude();
|
ConceptSetComponent include = vs.getCompose().addInclude();
|
||||||
include.setSystem(TermTestUtil.URL_MY_CODE_SYSTEM);
|
include.setSystem(TermTestUtil.URL_MY_CODE_SYSTEM);
|
||||||
include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("ParentA");
|
include.addFilter().setProperty("concept").setOp(FilterOperator.DESCENDENTOF).setValue("ParentA");
|
||||||
|
|
||||||
ValueSet result = myValueSetDao.expand(vs, null);
|
ValueSet result = myValueSetDao.expand(vs, null);
|
||||||
logAndValidateValueSet(result);
|
logAndValidateValueSet(result);
|
||||||
|
@ -814,7 +842,7 @@ public class FhirResourceDaoR4TerminologyTest extends BaseJpaR4Test {
|
||||||
vs = new ValueSet();
|
vs = new ValueSet();
|
||||||
include = vs.getCompose().addInclude();
|
include = vs.getCompose().addInclude();
|
||||||
include.setSystem(TermTestUtil.URL_MY_CODE_SYSTEM);
|
include.setSystem(TermTestUtil.URL_MY_CODE_SYSTEM);
|
||||||
include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("ParentA");
|
include.addFilter().setProperty("concept").setOp(FilterOperator.DESCENDENTOF).setValue("ParentA");
|
||||||
result = myValueSetDao.expand(vs, null);
|
result = myValueSetDao.expand(vs, null);
|
||||||
logAndValidateValueSet(result);
|
logAndValidateValueSet(result);
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
|
||||||
myLocalVs.setUrl(URL_MY_VALUE_SET);
|
myLocalVs.setUrl(URL_MY_VALUE_SET);
|
||||||
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
||||||
include.setSystem(codeSystem.getUrl());
|
include.setSystem(codeSystem.getUrl());
|
||||||
include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("ParentA");
|
include.addFilter().setProperty("concept").setOp(FilterOperator.DESCENDENTOF).setValue("ParentA");
|
||||||
myLocalValueSetId = myValueSetDao.create(myLocalVs, mySrd).getId().toUnqualifiedVersionless();
|
myLocalValueSetId = myValueSetDao.create(myLocalVs, mySrd).getId().toUnqualifiedVersionless();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1199,7 +1199,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
|
||||||
.setSystem(URL_MY_CODE_SYSTEM)
|
.setSystem(URL_MY_CODE_SYSTEM)
|
||||||
.addFilter()
|
.addFilter()
|
||||||
.setProperty("concept")
|
.setProperty("concept")
|
||||||
.setOp(FilterOperator.ISA)
|
.setOp(FilterOperator.DESCENDENTOF)
|
||||||
.setValue("A");
|
.setValue("A");
|
||||||
myLocalVs
|
myLocalVs
|
||||||
.getCompose()
|
.getCompose()
|
||||||
|
|
|
@ -167,7 +167,7 @@ public class ResourceProviderR4ValueSetVerCSNoVerTest extends BaseResourceProvid
|
||||||
myLocalVs.setUrl(URL_MY_VALUE_SET);
|
myLocalVs.setUrl(URL_MY_VALUE_SET);
|
||||||
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
||||||
include.setSystem(codeSystem.getUrl());
|
include.setSystem(codeSystem.getUrl());
|
||||||
include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("ParentA");
|
include.addFilter().setProperty("concept").setOp(FilterOperator.DESCENDENTOF).setValue("ParentA");
|
||||||
myLocalValueSetId = myValueSetDao.create(myLocalVs, mySrd).getId().toUnqualifiedVersionless();
|
myLocalValueSetId = myValueSetDao.create(myLocalVs, mySrd).getId().toUnqualifiedVersionless();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ public class ResourceProviderR4ValueSetVerCSVerTest extends BaseResourceProvider
|
||||||
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
||||||
include.setSystem(theCodeSystemUrl);
|
include.setSystem(theCodeSystemUrl);
|
||||||
include.setVersion(theValueSetVersion);
|
include.setVersion(theValueSetVersion);
|
||||||
include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("ParentA");
|
include.addFilter().setProperty("concept").setOp(FilterOperator.DESCENDENTOF).setValue("ParentA");
|
||||||
return myLocalVs;
|
return myLocalVs;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,7 +208,7 @@ public class ResourceProviderR5ValueSetTest extends BaseResourceProviderR5Test {
|
||||||
myLocalVs.setUrl(URL_MY_VALUE_SET);
|
myLocalVs.setUrl(URL_MY_VALUE_SET);
|
||||||
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
||||||
include.setSystem(codeSystem.getUrl());
|
include.setSystem(codeSystem.getUrl());
|
||||||
include.addFilter().setProperty("concept").setOp(Enumerations.FilterOperator.ISA).setValue("ParentA");
|
include.addFilter().setProperty("concept").setOp(Enumerations.FilterOperator.DESCENDENTOF).setValue("ParentA");
|
||||||
myLocalValueSetId = myValueSetDao.create(myLocalVs, mySrd).getId().toUnqualifiedVersionless();
|
myLocalValueSetId = myValueSetDao.create(myLocalVs, mySrd).getId().toUnqualifiedVersionless();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,7 @@ public class ResourceProviderR5ValueSetVersionedTest extends BaseResourceProvide
|
||||||
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
ConceptSetComponent include = myLocalVs.getCompose().addInclude();
|
||||||
include.setSystem(theCodeSystemUrl);
|
include.setSystem(theCodeSystemUrl);
|
||||||
include.setVersion(theValueSetVersion);
|
include.setVersion(theValueSetVersion);
|
||||||
include.addFilter().setProperty("concept").setOp(FilterOperator.ISA).setValue("ParentA");
|
include.addFilter().setProperty("concept").setOp(FilterOperator.DESCENDENTOF).setValue("ParentA");
|
||||||
return myLocalVs;
|
return myLocalVs;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,9 @@ public abstract class BaseChannelSettings implements IChannelSettings {
|
||||||
|
|
||||||
private ChannelRetryConfiguration myRetryConfigurationParameters;
|
private ChannelRetryConfiguration myRetryConfigurationParameters;
|
||||||
|
|
||||||
|
// init true to match previous behaviour
|
||||||
|
private boolean myUseJacksonMessageConverter = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default true. Used by IChannelNamer to decide how to qualify the channel name.
|
* Default true. Used by IChannelNamer to decide how to qualify the channel name.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue