From fc1cfae9252cf0bc3a30db7798973c03c65808e0 Mon Sep 17 00:00:00 2001 From: c-schuler Date: Tue, 25 Apr 2023 10:06:45 -0600 Subject: [PATCH 1/2] Configuring query generator to expand value sets for remote data and terminology providers --- .../org/opencds/cqf/ruler/cpg/CqlEvaluationHelper.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugin/cpg/src/main/java/org/opencds/cqf/ruler/cpg/CqlEvaluationHelper.java b/plugin/cpg/src/main/java/org/opencds/cqf/ruler/cpg/CqlEvaluationHelper.java index a98defbb2..0e27b1816 100644 --- a/plugin/cpg/src/main/java/org/opencds/cqf/ruler/cpg/CqlEvaluationHelper.java +++ b/plugin/cpg/src/main/java/org/opencds/cqf/ruler/cpg/CqlEvaluationHelper.java @@ -170,20 +170,26 @@ private void setupDataProvider(DaoRegistry daoRegistry) { if (useServerData) { JpaFhirRetrieveProvider jpaRetriever = new JpaFhirRetrieveProvider(daoRegistry, searchParameterResolver); jpaRetriever.setModelResolver(modelResolver); + if (!(terminologyProvider instanceof JpaTerminologyProvider)) { + this.queryGenerator.setExpandValueSets(true); + } jpaRetriever.setFhirQueryGenerator(queryGenerator); jpaRetriever.setTerminologyProvider(terminologyProvider); - if (terminologyEndpoint != null) + if (terminologyEndpoint != null) { jpaRetriever.setExpandValueSets(true); + } retrieveProviders.add(jpaRetriever); } if (dataEndpoint != null) { RestFhirRetrieveProvider restRetriever = new RestFhirRetrieveProvider( searchParameterResolver, resolveRemoteClient(dataEndpoint)); restRetriever.setModelResolver(modelResolver); + this.queryGenerator.setExpandValueSets(true); restRetriever.setFhirQueryGenerator(queryGenerator); restRetriever.setTerminologyProvider(terminologyProvider); - if (terminologyEndpoint != null) + if (terminologyEndpoint != null) { restRetriever.setExpandValueSets(true); + } retrieveProviders.add(restRetriever); } dataProvider = new CompositeDataProvider(modelResolver, new PriorityRetrieveProvider(retrieveProviders)); From bd8b876e483075d248b03ec23897ace0b22f491d Mon Sep 17 00:00:00 2001 From: c-schuler Date: Wed, 26 Apr 2023 12:06:41 -0600 Subject: [PATCH 2/2] Workaround for new FHIRQueryGenerator creation in SearchParamFhirRetrieveProvider --- .../org/opencds/cqf/ruler/cpg/CqlEvaluationHelper.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugin/cpg/src/main/java/org/opencds/cqf/ruler/cpg/CqlEvaluationHelper.java b/plugin/cpg/src/main/java/org/opencds/cqf/ruler/cpg/CqlEvaluationHelper.java index 0e27b1816..1c3156426 100644 --- a/plugin/cpg/src/main/java/org/opencds/cqf/ruler/cpg/CqlEvaluationHelper.java +++ b/plugin/cpg/src/main/java/org/opencds/cqf/ruler/cpg/CqlEvaluationHelper.java @@ -170,9 +170,6 @@ private void setupDataProvider(DaoRegistry daoRegistry) { if (useServerData) { JpaFhirRetrieveProvider jpaRetriever = new JpaFhirRetrieveProvider(daoRegistry, searchParameterResolver); jpaRetriever.setModelResolver(modelResolver); - if (!(terminologyProvider instanceof JpaTerminologyProvider)) { - this.queryGenerator.setExpandValueSets(true); - } jpaRetriever.setFhirQueryGenerator(queryGenerator); jpaRetriever.setTerminologyProvider(terminologyProvider); if (terminologyEndpoint != null) { @@ -187,9 +184,7 @@ private void setupDataProvider(DaoRegistry daoRegistry) { this.queryGenerator.setExpandValueSets(true); restRetriever.setFhirQueryGenerator(queryGenerator); restRetriever.setTerminologyProvider(terminologyProvider); - if (terminologyEndpoint != null) { - restRetriever.setExpandValueSets(true); - } + restRetriever.setExpandValueSets(true); retrieveProviders.add(restRetriever); } dataProvider = new CompositeDataProvider(modelResolver, new PriorityRetrieveProvider(retrieveProviders));