fix(labs): pair the panel changes by marker, not by printed name

This commit is contained in:
Marc-André Bombeck committed 2026-10-16 05:32:13 +02:00
1 parent 8ba4d1b0d0
commit 7167ba8cdc
3 files changed
+69 -5

No files matched your search

@@ -45,6 +45,7 @@ export const GET = apiHandler(async () => {
where: { userId: user.id, deletedAt: null, value: { not: null } },
select: {
analyte: true,
biomarkerId: true,
unit: true,
value: true,
referenceLow: true,
@@ -61,6 +62,7 @@ export const GET = apiHandler(async () => {
const summary = summariseLabChanges(
rows.map((r) => ({
analyte: r.analyte,
biomarkerId: r.biomarkerId,
unit: r.unit,
value: r.value as number,
referenceLow: r.referenceLow,