From 7981c34cc7e05185328afe7ad04529556f00ad7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 8 Aug 2026 13:48:14 +0200 Subject: [PATCH] Drop the two visit exports nothing consumes yet The timezone resolver and the dependent-keys bundle shipped ahead of their consumers, and the dead-code gate rightly went red on the trunk. The surfaces that need them arrive with the next visit stage and bring them back together with their callers. --- src/lib/encounters/service.ts | 8 -------- src/lib/query-keys/index.ts | 14 -------------- 2 files changed, 22 deletions(-) diff --git a/src/lib/encounters/service.ts b/src/lib/encounters/service.ts index b1078ff8f..49d41bd64 100644 --- a/src/lib/encounters/service.ts +++ b/src/lib/encounters/service.ts @@ -26,14 +26,6 @@ import { const DEFAULT_TIMEZONE = "Europe/Berlin"; -export async function resolveTimezone(userId: string): Promise { - const row = await prisma.user.findUnique({ - where: { id: userId }, - select: { timezone: true }, - }); - return row?.timezone || DEFAULT_TIMEZONE; -} - /** * The record owner's zone AND language, read together. * diff --git a/src/lib/query-keys/index.ts b/src/lib/query-keys/index.ts index ed88535ff..f418db1a7 100644 --- a/src/lib/query-keys/index.ts +++ b/src/lib/query-keys/index.ts @@ -238,20 +238,6 @@ export const medicationDependentKeys = [ */ export const cycleDependentKeys = [queryKeys.cycle(), queryKeys.insightsRoot()]; -/** - * Keys invalidated when a visit or an address-book entry changes. - * - * Both roots ride together in one bundle rather than two, because the two - * writes reach each other: renaming a practice changes the label every visit - * that names it renders, and deleting one nulls the reference on visits that - * stay. A bundle that evicted only the surface being written would leave the - * other showing the pre-write name. - */ -export const encounterDependentKeys = [ - queryKeys.encounters(), - queryKeys.practitioners(), -]; - /** * Invalidate every key in the bundle in parallel. Use this from mutation * `onSuccess` handlers so the call site stays a one-liner instead of repeating