UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

65 lines (64 loc) 2.64 kB
export declare class Code { code: string; system?: string | undefined; version?: string | undefined; display?: string | undefined; constructor(code: string, system?: string | undefined, version?: string | undefined, display?: string | undefined); get isCode(): boolean; hasMatch(code: any): any; } export declare class Concept { codes: any[]; display?: string | undefined; constructor(codes: any[], display?: string | undefined); get isConcept(): boolean; hasMatch(code: any): any; } export declare abstract class Vocabulary { id: string; version?: string | undefined; name?: string | undefined; constructor(id: string, version?: string | undefined, name?: string | undefined); } export declare class CodeSystem extends Vocabulary { id: string; version?: string | undefined; name?: string | undefined; constructor(id: string, version?: string | undefined, name?: string | undefined); } export declare class CQLValueSet extends Vocabulary { id: string; version?: string | undefined; name?: string | undefined; codesystems?: CodeSystem[] | undefined; constructor(id: string, version?: string | undefined, name?: string | undefined, codesystems?: CodeSystem[] | undefined); get isValueSet(): boolean; } export declare class ValueSet { oid: string; version?: string | undefined; codes: any[]; constructor(oid: string, version?: string | undefined, codes?: any[]); /** * Determines if the provided code matches any code in the current set. * If the input is a single string, it checks for a direct match with the * codes in the set, ensuring all code systems are consistent. Throws an * error if multiple code systems exist and a match is found, indicating * ambiguity. For other inputs, it checks for any matching codes using * the `codesInList` function. Used for the `code in valueset` operation. * * @param code - The code to be checked for a match, which can be a string * or an object containing codes. * @returns {boolean} True if a match is found, otherwise false. * @throws {Error} If a match is found with multiple code systems present. */ hasMatch(code: any): any; /** * Expands the current set of codes by returning a list of unique `Code` objects. * This method filters out duplicate codes from the `codes` array, ensuring each * code appears only once in the returned list. Use for the ExpandValueset operator * * @returns {Code[]} An array of unique `Code` objects. */ expand(): Code[]; }