Class CqlOperation
- java.lang.Object
 - 
- org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
 - 
- org.linuxforhealth.fhir.operation.cpg.AbstractCqlOperation
 - 
- org.linuxforhealth.fhir.operation.cpg.CqlOperation
 
 
 
 
- 
- All Implemented Interfaces:
 FHIROperation
public class CqlOperation extends AbstractCqlOperation
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCqlOperation.IncludeLibraryDetailData container for grouped input parameters library.url, library.name. 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_DEFINE_NAMEstatic java.lang.StringDEFAULT_FHIR_VERSIONstatic java.lang.StringDEFAULT_LIBRARY_NAMEstatic java.lang.StringDEFAULT_LIBRARY_VERSIONstatic java.lang.StringPARAM_IN_LIBRARYstatic java.lang.StringPARAM_IN_LIBRARY_NAMEstatic java.lang.StringPARAM_IN_LIBRARY_URL- 
Fields inherited from class org.linuxforhealth.fhir.operation.cpg.AbstractCqlOperation
PARAM_IN_CONTENT_ENDPOINT, PARAM_IN_DATA, PARAM_IN_DATA_ENDPOINT, PARAM_IN_DEBUG, PARAM_IN_EXPRESSION, PARAM_IN_PARAMETERS, PARAM_IN_PREFETCH_DATA, PARAM_IN_SUBJECT, PARAM_IN_TERMINOLOGY_ENDPOINT, PARAM_IN_USE_SERVER_DATA, PARAM_OUT_DEBUG_RESULT, PARAM_OUT_RETURN 
- 
Fields inherited from class org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
definition 
 - 
 
- 
Constructor Summary
Constructors Constructor Description CqlOperation() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OperationDefinitionbuildOperationDefinition()protected LibrarycreateLibraryResource(java.lang.String context, Parameters.Parameter expression, java.util.List<Parameters.Parameter> includes)Create a Library resource matching the provided input parameters.protected ParametersdoInvoke(FHIROperationContext operationContext, java.lang.Class<? extends Resource> resourceType, java.lang.String logicalId, java.lang.String versionId, Parameters parameters, FHIRResourceHelpers resourceHelper, SearchHelper searchHelper)This is the method that concrete subclasses must implement to perform the operation logic.protected java.util.Set<java.lang.String>getCqlExpressionsToEvaluate(ParameterMap paramMap)Get the expression names to evaluate in the primary libraryprotected CqlOperation.IncludeLibraryDetailgetIncludeDetail(Parameters.Parameter includeParameter)Convert FHIR Parameter resource into corresponding IncludeLibraryDetail DTO- 
Methods inherited from class org.linuxforhealth.fhir.operation.cpg.AbstractCqlOperation
checkUnsupportedParameter, checkUnsupportedParameters, createLibraryLoader, doEvaluation, doEvaluation, getCqlContext, getCqlContext, getCqlEngineParameters, getCqlParameters, getDebugMap, throwOperationException 
- 
Methods inherited from class org.linuxforhealth.fhir.server.spi.operation.AbstractOperation
buildExceptionWithIssue, buildExceptionWithIssue, countParameters, findOpDefParameter, getDefinition, getName, getParameter, getParameterDefinitions, getParameters, getResourceTypeNames, invoke, isAbstractResourceTypesDisallowed, isAdditionalMethodAllowed, validateInputParameters, validateOperationContext, validateOutputParameters, validateParameters 
 - 
 
 - 
 
- 
- 
Field Detail
- 
PARAM_IN_LIBRARY
public static final java.lang.String PARAM_IN_LIBRARY
- See Also:
 - Constant Field Values
 
 
- 
PARAM_IN_LIBRARY_URL
public static final java.lang.String PARAM_IN_LIBRARY_URL
- See Also:
 - Constant Field Values
 
 
- 
PARAM_IN_LIBRARY_NAME
public static final java.lang.String PARAM_IN_LIBRARY_NAME
- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_LIBRARY_NAME
public static final java.lang.String DEFAULT_LIBRARY_NAME
- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_LIBRARY_VERSION
public static final java.lang.String DEFAULT_LIBRARY_VERSION
- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_FHIR_VERSION
public static final java.lang.String DEFAULT_FHIR_VERSION
- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_DEFINE_NAME
public static final java.lang.String DEFAULT_DEFINE_NAME
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
buildOperationDefinition
protected OperationDefinition buildOperationDefinition()
- Specified by:
 buildOperationDefinitionin classAbstractOperation
 
- 
doInvoke
protected Parameters doInvoke(FHIROperationContext operationContext, java.lang.Class<? extends Resource> resourceType, java.lang.String logicalId, java.lang.String versionId, Parameters parameters, FHIRResourceHelpers resourceHelper, SearchHelper searchHelper) throws FHIROperationException
Description copied from class:AbstractOperationThis is the method that concrete subclasses must implement to perform the operation logic.- Specified by:
 doInvokein classAbstractOperation- Returns:
 - the Parameters object to return or null if there is no response Parameters object to return
 - Throws:
 FHIROperationException
 
- 
createLibraryResource
protected Library createLibraryResource(java.lang.String context, Parameters.Parameter expression, java.util.List<Parameters.Parameter> includes)
Create a Library resource matching the provided input parameters.- Parameters:
 context- CQL execution context (e.g. Patient)expression- FHIR Parameter resource containg the CQL code to evaluateincludes- List of FHIR parameter resources describing any helper libraries that need to be included in order to evaluate the provided expression.- Returns:
 - generated Library resource
 
 
- 
getIncludeDetail
protected CqlOperation.IncludeLibraryDetail getIncludeDetail(Parameters.Parameter includeParameter)
Convert FHIR Parameter resource into corresponding IncludeLibraryDetail DTO- Parameters:
 includeParameter- FHIR Parameter resource- Returns:
 - IncludeLibraryDetail
 
 
- 
getCqlExpressionsToEvaluate
protected java.util.Set<java.lang.String> getCqlExpressionsToEvaluate(ParameterMap paramMap)
Description copied from class:AbstractCqlOperationGet the expression names to evaluate in the primary library- Specified by:
 getCqlExpressionsToEvaluatein classAbstractCqlOperation- Parameters:
 paramMap- operation input- Returns:
 - expression names to evaluate
 
 
 - 
 
 -