Package com.ibm.fhir.cql.engine.retrieve
Class SearchParameterFHIRRetrieveProvider
- java.lang.Object
-
- org.opencds.cqf.cql.engine.retrieve.TerminologyAwareRetrieveProvider
-
- com.ibm.fhir.cql.engine.retrieve.SearchParameterFHIRRetrieveProvider
-
- All Implemented Interfaces:
org.opencds.cqf.cql.engine.retrieve.RetrieveProvider
- Direct Known Subclasses:
RestFHIRRetrieveProvider
,ServerFHIRRetrieveProvider
public abstract class SearchParameterFHIRRetrieveProvider extends org.opencds.cqf.cql.engine.retrieve.TerminologyAwareRetrieveProvider
Provide support for CQL Engine RetrieveProvider implementations that wish to build retrieve support on top of query parameters defined in the FHIR REST API specification.
-
-
Constructor Summary
Constructors Constructor Description SearchParameterFHIRRetrieveProvider(SearchParameterResolver searchParameterResolver)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Iterable<Object>
executeQueries(String resourceType, List<SearchParameterMap> queries)
protected SearchParameterMap
getBaseMap(org.apache.commons.lang3.tuple.Pair<String,IQueryParameter> templateParam, org.apache.commons.lang3.tuple.Pair<String,IQueryParameter> contextParam, org.apache.commons.lang3.tuple.Pair<String,DateRangeParameter> dateRangeParam)
protected List<IQueryParameterOr<?>>
getCodeParams(String name, Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, String valueSet)
protected org.apache.commons.lang3.tuple.Pair<String,List<IQueryParameterOr<?>>>
getCodeParams(String resourceType, String codePath, Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, String valueSet)
protected org.apache.commons.lang3.tuple.Pair<String,IQueryParameter>
getContextParam(String resourceType, String context, String contextPath, Object contextValue)
protected org.apache.commons.lang3.tuple.Pair<String,DateRangeParameter>
getDateRangeParam(String resourceType, String datePath, String dateLowPath, String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange)
int
getMaxCodesPerQuery()
protected String
getModifiedName(String name, IQueryParameter param)
Given a query parameter name and contents, transmute the name into something that includes all the appropriate modifiers.Integer
getPageSize()
protected org.apache.commons.lang3.tuple.Pair<String,IQueryParameter>
getTemplateParam(String resourceType, String templateId)
protected List<SearchParameterMap>
innerSetupQueries(String resourceType, org.apache.commons.lang3.tuple.Pair<String,IQueryParameter> templateParam, org.apache.commons.lang3.tuple.Pair<String,IQueryParameter> contextParam, org.apache.commons.lang3.tuple.Pair<String,DateRangeParameter> dateRangeParam, org.apache.commons.lang3.tuple.Pair<String,List<IQueryParameterOr<?>>> codeParams)
Iterable<Object>
retrieve(String context, String contextPath, Object contextValue, String dataType, String templateId, String codePath, Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, String valueSet, String datePath, String dateLowPath, String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange)
void
setMaxCodesPerQuery(int value)
void
setPageSize(Integer value)
protected List<SearchParameterMap>
setupQueries(String context, String contextPath, Object contextValue, String resourceType, String templateId, String codePath, Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, String valueSet, String datePath, String dateLowPath, String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange)
-
-
-
Constructor Detail
-
SearchParameterFHIRRetrieveProvider
public SearchParameterFHIRRetrieveProvider(SearchParameterResolver searchParameterResolver)
-
-
Method Detail
-
setPageSize
public void setPageSize(Integer value)
-
getPageSize
public Integer getPageSize()
-
setMaxCodesPerQuery
public void setMaxCodesPerQuery(int value)
-
getMaxCodesPerQuery
public int getMaxCodesPerQuery()
-
executeQueries
protected abstract Iterable<Object> executeQueries(String resourceType, List<SearchParameterMap> queries) throws Exception
- Throws:
Exception
-
retrieve
public Iterable<Object> retrieve(String context, String contextPath, Object contextValue, String dataType, String templateId, String codePath, Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, String valueSet, String datePath, String dateLowPath, String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange)
-
setupQueries
protected List<SearchParameterMap> setupQueries(String context, String contextPath, Object contextValue, String resourceType, String templateId, String codePath, Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, String valueSet, String datePath, String dateLowPath, String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange) throws Exception
- Throws:
Exception
-
innerSetupQueries
protected List<SearchParameterMap> innerSetupQueries(String resourceType, org.apache.commons.lang3.tuple.Pair<String,IQueryParameter> templateParam, org.apache.commons.lang3.tuple.Pair<String,IQueryParameter> contextParam, org.apache.commons.lang3.tuple.Pair<String,DateRangeParameter> dateRangeParam, org.apache.commons.lang3.tuple.Pair<String,List<IQueryParameterOr<?>>> codeParams) throws Exception
- Throws:
Exception
-
getTemplateParam
protected org.apache.commons.lang3.tuple.Pair<String,IQueryParameter> getTemplateParam(String resourceType, String templateId)
-
getContextParam
protected org.apache.commons.lang3.tuple.Pair<String,IQueryParameter> getContextParam(String resourceType, String context, String contextPath, Object contextValue) throws Exception
- Throws:
Exception
-
getDateRangeParam
protected org.apache.commons.lang3.tuple.Pair<String,DateRangeParameter> getDateRangeParam(String resourceType, String datePath, String dateLowPath, String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange) throws Exception
- Throws:
Exception
-
getCodeParams
protected org.apache.commons.lang3.tuple.Pair<String,List<IQueryParameterOr<?>>> getCodeParams(String resourceType, String codePath, Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, String valueSet) throws Exception
- Throws:
Exception
-
getCodeParams
protected List<IQueryParameterOr<?>> getCodeParams(String name, Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, String valueSet)
-
getBaseMap
protected SearchParameterMap getBaseMap(org.apache.commons.lang3.tuple.Pair<String,IQueryParameter> templateParam, org.apache.commons.lang3.tuple.Pair<String,IQueryParameter> contextParam, org.apache.commons.lang3.tuple.Pair<String,DateRangeParameter> dateRangeParam) throws Exception
- Throws:
Exception
-
getModifiedName
protected String getModifiedName(String name, IQueryParameter param)
Given a query parameter name and contents, transmute the name into something that includes all the appropriate modifiers.- Parameters:
name
- query parameter nameparam
- query parameter contents- Returns:
- query parameter name with appropriate modifiers appended
-
-