import type { TFunction } from 'i18next'; import type { AnamnesisRecord, IntakeAnswer, IntakeFieldDef, IntakeSectionDef, NumericParameterDef, PathologyCode, PatientSex, Visit } from './anamnesis-types'; /** Only show a field when it is relevant to the patient's recorded sex. * Single definition — this previously existed three times (intake, compile, * read-only) and drifting copies are a correctness risk, not just noise. */ export declare function fieldVisible(def: IntakeFieldDef, sex: PatientSex): boolean; /** The locale a `t` is fixed to. Both `useTranslation('ui')` and a locale-pinned * `getFixedT(lng, ns)` set it, so this is the app language on every surface. */ export declare function localeOf(t: TFunction): string | undefined; /** Every stored date rendered outside a JSX ``, in the app locale * so one visit cannot render two ways on one screen. A date-only string is * pinned to UTC and renders as written; a `YYYY-MM-DDTHH:mm` string is a * LOCAL instant and renders as date + short time — never through the UTC * pin, which would print the wrong day for an early-morning visit. */ export declare function visitDateLabel(iso: string, t: TFunction): string; /** A stored `YYYY-MM-DD` as a LOCAL calendar date. `new Date(iso)` would parse * it as UTC midnight and render the previous day west of Greenwich — the * off-by-one this pattern has already had to fix once. A datetime string * yields its calendar day: the day is what a date control edits. */ export declare function parseCalendarDate(iso: string): Date | undefined; /** The `THH:mm` tail of a datetime string, or `''` for a date-only one — so a * control that edits only the calendar day writes the day back without * discarding the time the visit was stamped with. */ export declare function clockSuffix(iso: string): string; /** A local calendar date back to `YYYY-MM-DD`. `toISOString()` would convert to * UTC first and can land on the wrong day; these are the local components. */ export declare function toCalendarIso(date: Date): string; /** One visit as an option label. The ordinal disambiguates two visits recorded * on the same calendar day, which would otherwise read identically. * * `hasNote` marks a visit whose note is only readable once that visit is a * column — without it the picker gives the reader no reason to pick it, and * the note is unreachable in practice rather than one tick away. */ export declare function visitOptionLabel(visit: Visit, index: number, t: TFunction, hasNote?: boolean): string; /** Age at an EXPLICIT reference instant. An unreadable date of birth or * reference date renders the em dash — the same absence marker every other * unknown uses, and never the "NaN years" the raw subtraction used to print. * Surfaces call `patientAgeLabel`; this stays for a caller that genuinely has * its own reference date. */ export declare function ageLabel(dateOfBirthIso: string, referenceIso: string, t: TFunction): string; /** The patient header's age line, on every surface. Takes the RECORD rather * than a date, so no call site can pick its own reference visit — picking one * per surface is exactly how intake and compile came to print two different * ages for the same patient. A record with no visit has no age to state. */ export declare function patientAgeLabel(record: AnamnesisRecord, t: TFunction): string; /** Numeric parameter label — practice wording, else `anamnesis.param.`. */ export declare function parameterLabel(def: NumericParameterDef, t: TFunction): string; /** Parameter label with its unit appended, as the form fields render it. Unit * symbols (kg, mg/dL) are locale-invariant scientific notation. */ export declare function parameterLabelWithUnit(def: NumericParameterDef, t: TFunction): string; /** Intake field label — practice wording, else `anamnesis.field..label`. */ export declare function intakeFieldLabel(def: IntakeFieldDef, t: TFunction): string; /** Intake field label with its unit appended — what a `number` field renders, * so the reader knows whether 85 is kilograms or pounds before typing it. * * Practice units only in practice: no kit-seeded intake field carries `unit` * (the seeded labels spell theirs out), which is why this is a sibling helper * and not folded into `intakeFieldLabel` — that one also feeds the config * editor's rename placeholder, where a unit would end up inside the wording. */ export declare function intakeFieldLabelWithUnit(def: IntakeFieldDef, t: TFunction): string; /** Optional help text under an intake field. Practice help text wins; the kit * key is optional and resolves to `undefined` when unset. */ export declare function intakeFieldHelp(def: IntakeFieldDef, t: TFunction): string | undefined; /** Section heading — practice wording, else `anamnesis.section.`. */ export declare function sectionLabel(section: IntakeSectionDef, t: TFunction): string; /** Pathology description. The code itself is never translated; the entry may * be absent from the taxonomy entirely, in which case the code stands alone. * `pathologyLabelKey` sanitises the dot — i18next reads `.` as a separator, so * `E66.0` must never be concatenated into a key by hand. */ export declare function pathologyLabel(code: string, t: TFunction, entry?: PathologyCode): string; /** `E66.0 — Obesity due to excess calories`, the form the pickers and badges * render. Falls back to the bare code when nothing describes it. */ export declare function pathologyCodeWithLabel(code: string, t: TFunction, entry?: PathologyCode): string; /** Whether an answer carries a real response. Shared by the progress meter, * the digest and the mandatory-answer check, so all three agree. "Not sure" * counts as UNANSWERED — provisional, pending the customer's own rule. Zero is * a value: every numeric branch is `!= null`, never a truthiness test. */ export declare function isIntakeAnswered(answer: IntakeAnswer | undefined): boolean; /** One intake answer as a read-only string. Absent values render an em dash — * never "undefined", never a bare hyphen. Zero is a value: every check here is * `!= null`, never a truthiness test on a number. */ export declare function formatIntakeAnswer(answer: IntakeAnswer, def: IntakeFieldDef, t: TFunction): string; //# sourceMappingURL=anamnesis-format.d.ts.map