import type { Visit } from './anamnesis-types'; /** Column id of the synthetic merged first visit. A record must not hold a * real visit with this id. */ export declare const BASELINE_VISIT_ID = "baseline"; export interface VisitBaseline { /** The synthetic merged first visit; `null` when the record holds fewer * than two first visits. */ baseline: Visit | null; /** The first visits folded into it, oldest first. Empty when `baseline` * is null. */ sources: Visit[]; /** The list every downstream read runs on: `[baseline, ...non-first visits * in record order]` — or the INPUT ARRAY ITSELF when nothing merged. */ visits: Visit[]; /** What the picker may toggle: `visits` minus the baseline (the input * array itself when nothing merged). */ pickable: Visit[]; } export interface ResolveBaselineOptions { /** A visit that stays its own column even when it is a first visit — * compile mode's editable newest visit. Omitted = every first visit folds. */ keepId?: string; } /** One sort key for every source, on the event axis's rule: with any * date-only stamp among them all compare by UTC-anchored calendar DAY, else * by instant — so the merge order never depends on the viewer's time zone. * Unreadable dates sort last; `Array.sort` is stable, so ties keep record * order. */ export declare function visitSortKey(visits: readonly Visit[]): (iso: string) => number; export declare function isBaselineVisit(visit: Visit): boolean; /** Resolve the effective visit list. Never mutates `visits` or any visit in * it; the synthetic visit is built field by field so nothing of a source's * identity (id, source label, practitioner) leaks into it. */ export declare function resolveBaseline(visits: readonly Visit[], { keepId }?: ResolveBaselineOptions): VisitBaseline; //# sourceMappingURL=anamnesis-baseline.d.ts.map