import { DetailedPopulationGroupResult, EpisodeResults, PopulationResult, StratifierResult } from '../types/Calculator'; import { ELM, ELMStatement } from '../types/ELMTypes'; import * as cql from '../types/CQLTypes'; /** * Create population values (aka results) for all populations in the population group using the results from the * calculator. This creates the DetailedPopulationGroupResult for the patient that will be filled by most of the * results processing functions. * * @param {fhir4.Measure} measure - The measure we are getting the values for. * @param {fhir4.MeasureGroup} populationGroup - The population group that we are creating results to. * @param {cql.StatementResults} patientResults - The raw results object from the calculation engine for a patient. * @returns {DetailedPopulationGroupResult} The population group results object with the populationResults, stratifierResults, * and episodeResults (if episode of care measure) populated. */ export declare function createPopulationValues(measure: fhir4.Measure, populationGroup: fhir4.MeasureGroup, patientResults: cql.StatementResults): DetailedPopulationGroupResult; /** * Takes in the initial values from the population and checks to see if some values should not be calculated. These * values that should not be considered calculated are zeroed out. ex. results NUMER is true but IPP is false. * @param {PopulationResult[]} populationResults - The list of population results. * @param {fhir4.MeasureGroup} group - Full Measure Group used to detect multiple IPPs and resolve any references between populations * @param {string} measureScoringCode scoring code for measure (used if scoring code not provided at the group level) * @returns {PopulationResult[]} Population results in the list as passed in, but the appropriate values are zeroed out. */ export declare function handlePopulationValues(populationResults: PopulationResult[], group: fhir4.MeasureGroup, measureScoringCode?: string): PopulationResult[]; export declare function handleRatioPopulationValues(populationResults: PopulationResult[], group: fhir4.MeasureGroup): PopulationResult[]; export declare function handleCVPopulationValues(populationResults: PopulationResult[]): PopulationResult[]; export declare function handleStandardPopulationValues(populationResults: PopulationResult[], group: fhir4.MeasureGroup): PopulationResult[]; /** * Create patient population values (aka results) for all populations in the population group using the results from the * calculator. * @param {fhir4.MeasureGroup} populationGroup - The population group we are getting the values for. * @param {cql.StatementResults} patientResults - The raw results object for a patient from the calculation engine. * @returns {PopulationResult[]} The population results list. */ export declare function createPatientPopulationValues(populationGroup: fhir4.MeasureGroup, patientResults: cql.StatementResults): { populationResults: PopulationResult[]; stratifierResults?: StratifierResult[]; }; export declare function handleStratificationValues(populationGroup: fhir4.MeasureGroup, populationResults: PopulationResult[], stratifierResults: StratifierResult[]): StratifierResult[]; /** * Create population results for all episodes using the results from the calculator. This is * used only for the episode of care measures. * @param {fhir4.MeasureGroup} populationGroup - The population group we are getting the values for. * @param {cql.StatementResults} patientResults - The raw results object for the patient from the calculation engine. * @param {string} measureScoringCode scoring code for measure (used if scoring code not provided at the group level) * @returns {EpisodeResults[]} The episode results list. Structure with episode id population results for each episode. * If this is a continuous variable measure the observations are included. */ export declare function createEpisodePopulationValues(populationGroup: fhir4.MeasureGroup, patientResults: cql.StatementResults, measureScoringCode?: string): EpisodeResults[]; /** * Set all value set versions to 'undefined' so the execution engine does not grab the specified * version in the ELM * * @param elm List of elm libraries to remove valueSet versions from. * @returns The list passed in. */ export declare function setValueSetVersionsToUndefined(elm: ELM[]): ELM[]; /** * Returns an ELM function to add to the ELM before it is used for calculation. This function is generated * for each observation on the measure. It returns a list of tuples, with each episode being observed and the * observation for the episode. * * @param {string} functionName - Name of the observation function. Usually "Measure Observation". * @param {string} parameter - Name of the define statement to use as the parameter list. Usually "Measure Population". * @returns {ELMStatement} The ELM function to inject into the ELM library before executing. */ export declare function generateEpisodeELMJSONFunction(functionName: string, parameter: string): ELMStatement; export declare function generateBooleanELMJSONFunction(functionName: string): ELMStatement;