diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/job/GroupBulkItemReader.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/job/GroupBulkItemReader.java index c12f9caec29..0118ed6b2fc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/job/GroupBulkItemReader.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/job/GroupBulkItemReader.java @@ -69,7 +69,7 @@ public class GroupBulkItemReader extends BaseBulkItemReader implements ItemReade @Value("#{jobParameters['" + BulkExportJobConfig.GROUP_ID_PARAMETER + "']}") private String myGroupId; - @Value("#{jobParameters['" + BulkExportJobConfig.EXPAND_MDM_PARAMETER+ "']}") + @Value("#{jobParameters['" + BulkExportJobConfig.EXPAND_MDM_PARAMETER+ "'] ?:false}") private boolean myMdmEnabled; @Autowired diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java index 2308b9c1679..5872667606d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IMdmLinkDao.java @@ -52,6 +52,9 @@ public interface IMdmLinkDao extends JpaRepository { "SELECT ml.myGoldenResourcePid FROM MdmLink ml " + "INNER JOIN ResourceLink hrl " + "ON hrl.myTargetResourcePid=ml.mySourcePid " + - "AND hrl.mySourceResourcePid=:groupPid)") + "AND hrl.mySourceResourcePid=:groupPid " + + "AND hrl.mySourcePath='Group.member.entity' " + + "AND hrl.myTargetResourceType='Patient'" + + ")") List> expandPidsFromGroupPidGivenMatchResult(@Param("groupPid") Long theGroupPid, @Param("matchResult") MdmMatchResultEnum theMdmMatchResultEnum); } diff --git a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaR4Config.java b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaR4Config.java index 1716e099cad..f73e9ed2480 100644 --- a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaR4Config.java +++ b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/config/TestJpaR4Config.java @@ -67,7 +67,8 @@ public class TestJpaR4Config extends BaseJavaConfigR4 { BasicDataSource retVal = new BasicDataSource(); retVal.setDriver(new org.h2.Driver()); - retVal.setUrl("jdbc:h2:mem:testdb_r4"); +// retVal.setUrl("jdbc:h2:mem:testdb_r4"); + retVal.setUrl("jdbc:h2:file:./testdb_r4;create=true"); retVal.setMaxWaitMillis(10000); retVal.setUsername(""); retVal.setPassword("");