Package com.ibm.fhir.operation.cqf
Class AbstractMeasureOperation
- java.lang.Object
-
- com.ibm.fhir.server.spi.operation.AbstractOperation
-
- com.ibm.fhir.operation.cqf.AbstractMeasureOperation
-
- All Implemented Interfaces:
FHIROperation
- Direct Known Subclasses:
CareGapsOperation
,EvaluateMeasureOperation
public abstract class AbstractMeasureOperation extends AbstractOperation
-
-
Field Summary
Fields Modifier and Type Field Description static String
CQL_PARAM_MEASUREMENT_PERIOD
static String
PARAM_IN_PERIOD_END
static String
PARAM_IN_PERIOD_START
-
Fields inherited from class com.ibm.fhir.server.spi.operation.AbstractOperation
definition
-
-
Constructor Summary
Constructors Constructor Description AbstractMeasureOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.opencds.cqf.cql.engine.execution.LibraryLoader
createLibraryLoader(List<Library> libraries)
Create a library loader that will server up the CQL library content of the provided list of FHIR Library resources.MeasureReport.Builder
doMeasureEvaluation(Measure measure, ZoneOffset zoneOffset, org.opencds.cqf.cql.engine.runtime.Interval measurementPeriod, String subjectOrPractitionerId, MeasureReportType reportType, org.opencds.cqf.cql.engine.terminology.TerminologyProvider termProvider, Map<String,org.opencds.cqf.cql.engine.data.DataProvider> dataProviders)
org.opencds.cqf.cql.engine.runtime.Interval
getMeasurementPeriod(ParameterMap paramMap, ZoneOffset zoneOffset)
Construct the Measurement Period interval that will be passed to the CQL Engine and Measurement Report builder.org.opencds.cqf.cql.engine.retrieve.RetrieveProvider
getRetrieveProvider(FHIRResourceHelpers resourceHelper, org.opencds.cqf.cql.engine.terminology.TerminologyProvider termProvider)
Create the retrieve provider that will be used to perform data retrieval during the operation evaluation.org.opencds.cqf.cql.engine.terminology.TerminologyProvider
getTerminologyProvider(FHIRResourceHelpers resourceHelpers)
Create the terminology provider that will be used to access terminology data during operation evaluation.ZoneOffset
getZoneOffset(ParameterMap paramMap)
Return theZoneOffset
which will be used to interpret dates that do not have associated time zone information.protected List<org.cqframework.cql.elm.execution.Library>
loadCqlLibraries(List<Library> libraries)
Load the CQL Library content for each of the provided FHIR Library resources with translation as needed for Libraries with CQL attachments and no corresponding ELM attachment.-
Methods inherited from class com.ibm.fhir.server.spi.operation.AbstractOperation
buildExceptionWithIssue, buildExceptionWithIssue, buildOperationDefinition, countParameters, doInvoke, findOpDefParameter, getDefinition, getName, getParameter, getParameterDefinitions, getParameters, getResourceTypeNames, invoke, isAbstractResourceTypesDisallowed, isAdditionalMethodAllowed, validateInputParameters, validateOperationContext, validateOutputParameters, validateParameters
-
-
-
-
Field Detail
-
CQL_PARAM_MEASUREMENT_PERIOD
public static final String CQL_PARAM_MEASUREMENT_PERIOD
- See Also:
- Constant Field Values
-
PARAM_IN_PERIOD_END
public static final String PARAM_IN_PERIOD_END
- See Also:
- Constant Field Values
-
PARAM_IN_PERIOD_START
public static final String PARAM_IN_PERIOD_START
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTerminologyProvider
public org.opencds.cqf.cql.engine.terminology.TerminologyProvider getTerminologyProvider(FHIRResourceHelpers resourceHelpers)
Create the terminology provider that will be used to access terminology data during operation evaluation.- Returns:
- Terminology Provider
-
getRetrieveProvider
public org.opencds.cqf.cql.engine.retrieve.RetrieveProvider getRetrieveProvider(FHIRResourceHelpers resourceHelper, org.opencds.cqf.cql.engine.terminology.TerminologyProvider termProvider)
Create the retrieve provider that will be used to perform data retrieval during the operation evaluation.- Parameters:
resourceHelper
- FHIR Resource HelperstermProvider
- Terminology Provider- Returns:
- Retrieve provider configured as appropriate for the environment
-
doMeasureEvaluation
public MeasureReport.Builder doMeasureEvaluation(Measure measure, ZoneOffset zoneOffset, org.opencds.cqf.cql.engine.runtime.Interval measurementPeriod, String subjectOrPractitionerId, MeasureReportType reportType, org.opencds.cqf.cql.engine.terminology.TerminologyProvider termProvider, Map<String,org.opencds.cqf.cql.engine.data.DataProvider> dataProviders)
-
getZoneOffset
public ZoneOffset getZoneOffset(ParameterMap paramMap)
Return theZoneOffset
which will be used to interpret dates that do not have associated time zone information. This includes the periodStart, periodEnd, and those specified in the CQL that is evaluated, . The default implementation uses the zone offset of the server performing the evaluation.- Parameters:
paramMap
- Operation input parameters- Returns:
- timezone offset that will be applied to dates without TimeZone specified
-
getMeasurementPeriod
public org.opencds.cqf.cql.engine.runtime.Interval getMeasurementPeriod(ParameterMap paramMap, ZoneOffset zoneOffset)
Construct the Measurement Period interval that will be passed to the CQL Engine and Measurement Report builder. The input parameters are FHIR date objects that do not contain timezone information. The start and end DateTime objects will be calculated based on thezoneOffset
that is provided.- Parameters:
paramMap
- Operation input parameterszoneOffset
-- Returns:
- Interval of DateTime values representing the measurement period.
-
createLibraryLoader
protected org.opencds.cqf.cql.engine.execution.LibraryLoader createLibraryLoader(List<Library> libraries)
Create a library loader that will server up the CQL library content of the provided list of FHIR Library resources.- Parameters:
libraries
- FHIR library resources- Returns:
- LibraryLoader that will serve the CQL Libraries for the provided FHIR resources
-
loadCqlLibraries
protected List<org.cqframework.cql.elm.execution.Library> loadCqlLibraries(List<Library> libraries)
Load the CQL Library content for each of the provided FHIR Library resources with translation as needed for Libraries with CQL attachments and no corresponding ELM attachment.- Parameters:
libraries
- FHIR Libraries- Returns:
- CQL Libraries
-
-