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 java.lang.String
CQL_PARAM_MEASUREMENT_PERIOD
static java.lang.String
PARAM_IN_PERIOD_END
static java.lang.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 MeasureReport.Builder
doMeasureEvaluation(FHIRResourceHelpers resourceHelpers, Measure measure, java.time.ZoneOffset zoneOffset, org.opencds.cqf.cql.engine.runtime.Interval measurementPeriod, java.lang.String subjectOrPractitionerId, MeasureReportType reportType, org.opencds.cqf.cql.engine.terminology.TerminologyProvider termProvider, java.util.Map<java.lang.String,org.opencds.cqf.cql.engine.data.DataProvider> dataProviders)
Given a FHIR Measure resource, evaluate the measure and return a report of the results.org.opencds.cqf.cql.engine.runtime.Interval
getMeasurementPeriod(ParameterMap paramMap, java.time.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, SearchHelper searchHelper)
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.java.time.ZoneOffset
getZoneOffset(ParameterMap paramMap)
Return theZoneOffset
which will be used to interpret dates that do not have associated time zone information.-
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 java.lang.String CQL_PARAM_MEASUREMENT_PERIOD
- See Also:
- Constant Field Values
-
PARAM_IN_PERIOD_END
public static final java.lang.String PARAM_IN_PERIOD_END
- See Also:
- Constant Field Values
-
PARAM_IN_PERIOD_START
public static final java.lang.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, SearchHelper searchHelper)
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(FHIRResourceHelpers resourceHelpers, Measure measure, java.time.ZoneOffset zoneOffset, org.opencds.cqf.cql.engine.runtime.Interval measurementPeriod, java.lang.String subjectOrPractitionerId, MeasureReportType reportType, org.opencds.cqf.cql.engine.terminology.TerminologyProvider termProvider, java.util.Map<java.lang.String,org.opencds.cqf.cql.engine.data.DataProvider> dataProviders) throws FHIROperationException
Given a FHIR Measure resource, evaluate the measure and return a report of the results.- Parameters:
resourceHelpers
- Resource helpers for data access operationsmeasure
- Measure resource to be evaluatedzoneOffset
- Zone offset of the timezone that will be used for Now or when partial dates are specified in the CQL.measurementPeriod
- Measurement period that will be provided as input to the Measure calculation.subjectOrPractitionerId
- Subject or Practitioner ID for which the measure will be calculated.reportType
- The type of measure report: subject, subject-list, or population. If not specified, a default value of subject will be used if the subject parameter is supplied, otherwise, population will be usedtermProvider
- terminology providerdataProviders
- data provider- Returns:
- MeasureReport.Builder that contains the calculated report data
- Throws:
FHIROperationException
- Measure evaluation fails
-
getZoneOffset
public java.time.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, java.time.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.
-
-