Class SearchParameterFHIRRetrieveProvider
- java.lang.Object
-
- org.opencds.cqf.cql.engine.retrieve.TerminologyAwareRetrieveProvider
-
- org.linuxforhealth.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 java.lang.Iterable<java.lang.Object>
executeQueries(java.lang.String resourceType, java.util.List<SearchParameterMap> queries)
protected SearchParameterMap
getBaseMap(org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter> templateParam, org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter> contextParam, org.apache.commons.lang3.tuple.Pair<java.lang.String,DateRangeParameter> dateRangeParam)
protected java.util.List<IQueryParameterOr<?>>
getCodeParams(java.lang.String name, java.lang.Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, java.lang.String valueSet)
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.List<IQueryParameterOr<?>>>
getCodeParams(java.lang.String resourceType, java.lang.String codePath, java.lang.Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, java.lang.String valueSet)
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter>
getContextParam(java.lang.String resourceType, java.lang.String context, java.lang.String contextPath, java.lang.Object contextValue)
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,DateRangeParameter>
getDateRangeParam(java.lang.String resourceType, java.lang.String datePath, java.lang.String dateLowPath, java.lang.String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange)
int
getMaxCodesPerQuery()
protected java.lang.String
getModifiedName(java.lang.String name, IQueryParameter param)
Given a query parameter name and contents, transmute the name into something that includes all the appropriate modifiers.java.lang.Integer
getPageSize()
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter>
getTemplateParam(java.lang.String resourceType, java.lang.String templateId)
protected java.util.List<SearchParameterMap>
innerSetupQueries(java.lang.String resourceType, org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter> templateParam, org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter> contextParam, org.apache.commons.lang3.tuple.Pair<java.lang.String,DateRangeParameter> dateRangeParam, org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.List<IQueryParameterOr<?>>> codeParams)
java.lang.Iterable<java.lang.Object>
retrieve(java.lang.String context, java.lang.String contextPath, java.lang.Object contextValue, java.lang.String dataType, java.lang.String templateId, java.lang.String codePath, java.lang.Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, java.lang.String valueSet, java.lang.String datePath, java.lang.String dateLowPath, java.lang.String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange)
void
setMaxCodesPerQuery(int value)
void
setPageSize(java.lang.Integer value)
protected java.util.List<SearchParameterMap>
setupQueries(java.lang.String context, java.lang.String contextPath, java.lang.Object contextValue, java.lang.String resourceType, java.lang.String templateId, java.lang.String codePath, java.lang.Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, java.lang.String valueSet, java.lang.String datePath, java.lang.String dateLowPath, java.lang.String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange)
-
-
-
Constructor Detail
-
SearchParameterFHIRRetrieveProvider
public SearchParameterFHIRRetrieveProvider(SearchParameterResolver searchParameterResolver)
-
-
Method Detail
-
setPageSize
public void setPageSize(java.lang.Integer value)
-
getPageSize
public java.lang.Integer getPageSize()
-
setMaxCodesPerQuery
public void setMaxCodesPerQuery(int value)
-
getMaxCodesPerQuery
public int getMaxCodesPerQuery()
-
executeQueries
protected abstract java.lang.Iterable<java.lang.Object> executeQueries(java.lang.String resourceType, java.util.List<SearchParameterMap> queries) throws java.lang.Exception
- Throws:
java.lang.Exception
-
retrieve
public java.lang.Iterable<java.lang.Object> retrieve(java.lang.String context, java.lang.String contextPath, java.lang.Object contextValue, java.lang.String dataType, java.lang.String templateId, java.lang.String codePath, java.lang.Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, java.lang.String valueSet, java.lang.String datePath, java.lang.String dateLowPath, java.lang.String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange)
-
setupQueries
protected java.util.List<SearchParameterMap> setupQueries(java.lang.String context, java.lang.String contextPath, java.lang.Object contextValue, java.lang.String resourceType, java.lang.String templateId, java.lang.String codePath, java.lang.Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, java.lang.String valueSet, java.lang.String datePath, java.lang.String dateLowPath, java.lang.String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange) throws java.lang.Exception
- Throws:
java.lang.Exception
-
innerSetupQueries
protected java.util.List<SearchParameterMap> innerSetupQueries(java.lang.String resourceType, org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter> templateParam, org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter> contextParam, org.apache.commons.lang3.tuple.Pair<java.lang.String,DateRangeParameter> dateRangeParam, org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.List<IQueryParameterOr<?>>> codeParams) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getTemplateParam
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter> getTemplateParam(java.lang.String resourceType, java.lang.String templateId)
-
getContextParam
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter> getContextParam(java.lang.String resourceType, java.lang.String context, java.lang.String contextPath, java.lang.Object contextValue) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getDateRangeParam
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,DateRangeParameter> getDateRangeParam(java.lang.String resourceType, java.lang.String datePath, java.lang.String dateLowPath, java.lang.String dateHighPath, org.opencds.cqf.cql.engine.runtime.Interval dateRange) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getCodeParams
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.List<IQueryParameterOr<?>>> getCodeParams(java.lang.String resourceType, java.lang.String codePath, java.lang.Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, java.lang.String valueSet) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getCodeParams
protected java.util.List<IQueryParameterOr<?>> getCodeParams(java.lang.String name, java.lang.Iterable<org.opencds.cqf.cql.engine.runtime.Code> codes, java.lang.String valueSet)
-
getBaseMap
protected SearchParameterMap getBaseMap(org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter> templateParam, org.apache.commons.lang3.tuple.Pair<java.lang.String,IQueryParameter> contextParam, org.apache.commons.lang3.tuple.Pair<java.lang.String,DateRangeParameter> dateRangeParam) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getModifiedName
protected java.lang.String getModifiedName(java.lang.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
-
-