Class AbstractMeasureOperation

    • 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
    • Constructor Detail

      • AbstractMeasureOperation

        public AbstractMeasureOperation()
    • 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 Helpers
        termProvider - 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 operations
        measure - Measure resource to be evaluated
        zoneOffset - 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 used
        termProvider - terminology provider
        dataProviders - 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 the ZoneOffset 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 the zoneOffset that is provided.
        Parameters:
        paramMap - Operation input parameters
        zoneOffset -
        Returns:
        Interval of DateTime values representing the measurement period.