import type { TFunction } from 'i18next'; import type { AnamnesisSummarySection } from '../../components/anamnesis-summary-card'; import type { IntakeResponse, IntakeSectionDef, PatientSex } from './anamnesis-types'; export interface SummarySource { response: IntakeResponse; /** Module name shown as the answer's source (combined view). */ sourceLabel?: string; /** Overrides `response.submittedAtIso` as the "recorded" stamp. */ reportedAtIso?: string; } export interface SummarySectionsResult { sections: AnamnesisSummarySection[]; /** Fields nobody answered (after the relevance skip). */ unansweredCount: number; } /** Maps intake definitions + one or more responses to summary rows. * * For every field the answered sources compete and the one with the LATEST * stamp (`reportedAtIso ?? response.submittedAtIso`) supplies the row — * `latestAnswered` spells out the ordering. The row carries the chosen * source's stamp and label so the card's HeartPulse tooltip can say when, * and from which module, a highlighted answer was recorded. * * Fields irrelevant to `opts.sex` (a `relevance` that is set, not `any`, and * differs) are skipped entirely and not counted; with no sex given nothing * is skipped, so an answered question is never silently dropped. Fields * nobody answered increment `unansweredCount`. Sections with no rows are * dropped. */ export declare function summarySectionsFromRecord(sections: readonly IntakeSectionDef[], sources: readonly SummarySource[], t: TFunction, opts?: { sex?: PatientSex; }): SummarySectionsResult; //# sourceMappingURL=anamnesis-summary-rows.d.ts.map