import { ELM, ELMBinaryExpression, ELMStatement } from '../types/ELMTypes'; /** * Finds all of the localIds that are needed for clause results for a single statement. * @public * @param {ELM} libraryElm - The library the statement belongs to. * @param {string} statementName - The statement name to search for. * @return {Hash} List of result-relevant local ids in the statement. */ export declare function findLocalIdsInStatementByName(libraryElm: ELM, statementName: string): any; /** * Finds all localIds in the statement structure recursively. * @private * @param {ELMStatement | any} statement - The statement structure or child parts of it. * @param {String} libraryName - The name of the library we are looking at. * @param {any[]} annotation - The JSON annotation for the entire structure, this is occasionally needed. * @param {any} localIds - The hash of localIds we are filling. * @param {any} aliasMap - The map of aliases. * @param {Array} emptyResultClauses - List of clauses that will have empty results from the engine. Each object on * this has info on where to find the actual result. * @param {any} parentNode - The parent node, used for some special situations. * @return {any} List of local ids in the statement. This is same array, localIds, that is passed in. */ export declare function findAllLocalIdsInStatement(statement: ELMStatement | any, libraryName: string, annotation: any[] | undefined, localIds: any, aliasMap: any, emptyResultClauses: any[], parentNode: any | null): any; /** * Finds all localIds in the sort structure recursively and sets the expressionLocalId to the parent statement. * @private * @param {any} statement - The statement structure or child parts of it. * @param {String} libraryName - The name of the library we are looking at. * @param {any} localIds - The hash of localIds we are filling. * @param {any} aliasMap - The map of aliases. * @param {any[]} emptyResultClauses - List of clauses that will have empty results from the engine. Each object on * this has info on where to find the actual result. * @param {any} rootStatement - The rootStatement. */ export declare function findAllLocalIdsInSort(statement: any, libraryName: string, localIds: any, aliasMap: any, emptyResultClauses: any[], rootStatement: any): any; /** * Due to how the cql-to-elm translator is written as of version 2.4.0, the comparison annotation includes the Literal * (if there is one) and is marked as the localId of the Literal making the highlighting look like the comparison always * passes. * This function adds a mapping to ensure that if there is a Literal, the result of the comparison clause should be the * result of the Literal clause as well. This will make the highlighting of the comparison and literal follow the result * of the comparison. */ export declare function findLocalIdsForComparisonOperators(statement: ELMBinaryExpression, libraryName: string, emptyResultClauses: any[]): any; /** * Find the localId of the library reference in the JSON elm annotation. This recursively searches the annotation structure * for the clause of the library ref. When that is found it knows where to look inside of that for where the library * reference may be. * * Consider the following example of looking for function ref with id "55" and library "global". * CQL for this is "global.CalendarAgeInYearsAt(...)". The following annotation snippet covers the call of the * function. * * { * "r": "55", * "s": [ * { * "r": "49", * "s": [ * { * "value": [ * "global" * ] * } * ] * }, * { * "value": [ * "." * ] * }, * { * "r": "55", * "s": [ * { * "value": [ * "\"CalendarAgeInYearsAt\"", * "(" * ] * }, * * This method will recurse through the structure until it stops on this snippet that has "r": "55". Then it will check * if the value of the first child is simply an array with a single string equaling "global". If that is indeed the * case then it will return the "r" value of that first child, which is the clause localId for the library part of the * function reference. If that is not the case, it will keep recursing and may eventually return null. * * @private * @param {any|any[]} annotation - The annotation structure or child in the annotation structure. * @param {string} refLocalId - The localId of the library ref we should look for. * @param {string} libraryName - The library reference name, used to find the clause. * @return {string|null} The localId of the clause for the library reference or null if not found. */ export declare function findLocalIdForLibraryRef(annotation: any | any[], refLocalId: string, libraryName: string | null): string | null; /** * Figure out if a statement is a function given library and statement name. * @public * @param {ELM} libraryName - The name of the library the statement belongs to. * @param {string} statementName - The statement name to search for. * @return {boolean} If the statement is a function or not. */ export declare function isStatementFunction(library: ELM, statementName: string): boolean; /** * Figure out if a statement is in a Supplemental Data Element given the statement name. * @public * @param {fhir4.MeasureSupplementalData[]} supplementalDataElements * @param {string} statementName - The statement to search for. * @return {boolean} Statement does or does not belong to a Supplemental Data Element. */ export declare function isSupplementalDataElementStatement(supplementalDataElements: fhir4.MeasureSupplementalData[] | undefined, statementName: string): boolean;