export declare class FilterItem { /** * The id is a string in the format 'KdEntity.PropertyName', * e.g., 'Person.Name', 'KdRxNorm.DateApproved' */ id: string; /**Valid filterLogic are And, Or, AndNot, OrNot * filterOperators control how filters are applied. The default is And. You can change with setFilterLogic() */ logic: string; /** The Kd EntityType property that we are filtering on * Examples: KdCity, KdPhysician, KdPharmacy */ entityType: string; /** A property or the KdEntity that we are filtering on * Examples: BirthDate, FirstName */ propertyName: string; /** * Valid DataType values are: String|Date|Number|Boolean|Moment|KdLocation or any data type that starts with Kd like KdCity * A Date is 'just a day', so midnight on the Date selected, think 'YYYY-MM-DD' where the hour, tz, etc do not matter. * A Date is good for most queries that look like this 'where foo >= barDate' as most people want the transactions for the entire day barDate. * We truncate Date filters on server so if you pass in the hours, minutes, seconds, miliseconds and tz...they will be ignored. * A Moment requires the use of moment.js and is a full DateTime with tz offset, good for fine grained time based queries (looking for that log entry or appointment between 13:25 and 13:27) * A Number is always treated as a decimal, but setting values to 1,2,3 is fine, normal and will work as expected. As will 1.2345, 2.6789, 3.101112 * * A Location is a geocode based search, either on Distance (lat, lng, unit, distance - so a radius) or BoundingBox * A KdEntity is a special KarmaData data type in the format {KdId, KdLabel, EntityType}. * The KdId is used in the query, the KdLabel is used in the UI to show user what they are filtering on. The EntityType is one of the KdEntityTypes such as KdCity, KdPhysician, etc. */ dataType: string; /** Valid filterOperator values for every DataType are: Eq|NotEq|All|Gt|Gte|Lt|Lte|All|Between|Null|NotNull. * Valid filterOperator values for only DataType KdEntity and String are: Contains|NotContains. * - If Eq|NotEq|All all items in array are considered. * - If Between only first two in array are considered * - If Gt|Gte|Lt|Lte only the first item in the array is considered * - If Contains|NotContains all items in array are considered, but only valid for KdEntity and String (for string if and only if KD has set up a special search index like a Google search with themes, fuzzy matching logic, etc) */ operator: string; /** filterValues are an array of filterValues. * The filterValues property of the filterItem object are all arrays of the Filter DataType, except booleanValues which has a single value */ values: any[]; /** * constructs a new FilterItem * @param entityType - the entity you are filtering on e.g. 'KdPhysician' * @param propertyName - the property that you are filtering by e.g. 'Age' * @param dataType - the data type of the property, possible values are: String|Date|Number|Boolean|Moment * @param operator - the operator for the filter, possible values are: Eq|NotEq|All|Gt|Gte|Lt|Lte|Like|NotLike|Between|Null|NotNull * @param values - an array of values. * @param logic - default And (And|Or|AndNot|OrNot) */ constructor(entityType: any, propertyName: any, dataType: any, operator?: string, values?: any[], logic?: string); errorCheckInitState(): void; setFilterLogic(logic: any): this; getFilterLogic(): string; setEntityType(entityType: any): this; getEntityType(): string; setPropertyName(propertyName: any): this; getPropertyName(): string; setDataType(dataType: any): this; getDataType(): string; setOperator(operator: any): this; getOperator(): string; setValues(values: any, operator: any): this; getValues(): any[]; setSelected(values: any, operator: any): this; getSelected(): any[]; clearSelected(): this; addSelected(values: any): this; toJSON(): { EntityType: string; PropertyName: string; DataType: string; Logic: string; Operator: string; Values: any; }; getFilterItemValue(): { EntityType: string; PropertyName: string; DataType: string; Logic: string; Operator: string; Values: any; }; } /** * * @param entityType * @param propertyName * @param dataType * @param operator equality operator, possible values are: Eq|NotEq|Gt|Gte|Lt|Lte|Between * @param values an array of values to filter on */ export declare function createFilterItem(entityType: string, propertyName: string, dataType: string, operator: string, values?: any[]): FilterItem;