diff --git a/messages/de.json b/messages/de.json index 8734261e1..a8e3de4fb 100644 --- a/messages/de.json +++ b/messages/de.json @@ -9556,8 +9556,7 @@ "sourceRange": { "fromReport": "Befundbereich {range}", "catalogDiffers": "dein Bereich {range}" - }, - "convertedFrom": "Umgerechnet aus {value} {unit}" + } }, "modules": { "cycle": { diff --git a/messages/en.json b/messages/en.json index f71d021e0..ab324e140 100644 --- a/messages/en.json +++ b/messages/en.json @@ -9556,8 +9556,7 @@ "sourceRange": { "fromReport": "Report range {range}", "catalogDiffers": "your range {range}" - }, - "convertedFrom": "Converted from {value} {unit}" + } }, "modules": { "cycle": { diff --git a/messages/es.json b/messages/es.json index 5f319854a..f1ac82194 100644 --- a/messages/es.json +++ b/messages/es.json @@ -9556,8 +9556,7 @@ "sourceRange": { "fromReport": "Rango del informe {range}", "catalogDiffers": "tu rango {range}" - }, - "convertedFrom": "Convertido de {value} {unit}" + } }, "modules": { "cycle": { diff --git a/messages/fr.json b/messages/fr.json index 8b23e5da4..633626fa5 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -9556,8 +9556,7 @@ "sourceRange": { "fromReport": "Plage du compte rendu {range}", "catalogDiffers": "votre plage {range}" - }, - "convertedFrom": "Converti depuis {value} {unit}" + } }, "modules": { "cycle": { diff --git a/messages/it.json b/messages/it.json index a6eacb8d0..cf8ffa384 100644 --- a/messages/it.json +++ b/messages/it.json @@ -9556,8 +9556,7 @@ "sourceRange": { "fromReport": "Intervallo del referto {range}", "catalogDiffers": "il tuo intervallo {range}" - }, - "convertedFrom": "Convertito da {value} {unit}" + } }, "modules": { "cycle": { diff --git a/messages/ko.json b/messages/ko.json index 2510e0b3d..c9a078170 100644 --- a/messages/ko.json +++ b/messages/ko.json @@ -9556,8 +9556,7 @@ "sourceRange": { "fromReport": "결과지 범위 {range}", "catalogDiffers": "내 범위 {range}" - }, - "convertedFrom": "{value} {unit}에서 변환됨" + } }, "modules": { "cycle": { diff --git a/messages/pl.json b/messages/pl.json index e6536a5bc..25d214f65 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -9556,8 +9556,7 @@ "sourceRange": { "fromReport": "Zakres z wyniku {range}", "catalogDiffers": "twój zakres {range}" - }, - "convertedFrom": "Przeliczono z {value} {unit}" + } }, "modules": { "cycle": { diff --git a/src/__tests__/i18n-reverse-coverage.test.ts b/src/__tests__/i18n-reverse-coverage.test.ts index edbc4eb8e..256bcbd89 100644 --- a/src/__tests__/i18n-reverse-coverage.test.ts +++ b/src/__tests__/i18n-reverse-coverage.test.ts @@ -77,9 +77,7 @@ const DYNAMIC_ALLOWLIST_PREFIXES = [ * all landed must be dropped in the same change, and the list is empty again * before the release is tagged. It is NOT a place for keys nobody will wire. */ -const RELEASE_PENDING_PREFIXES: Record = { - "labs.convertedFrom": "v1.42 lab unit conversion note (#1095)", -}; +const RELEASE_PENDING_PREFIXES: Record = {}; /** * Interpolating strings that LOOK like key templates and are not. Each entry diff --git a/src/lib/export/records-backup.ts b/src/lib/export/records-backup.ts index e5c35513c..b35424830 100644 --- a/src/lib/export/records-backup.ts +++ b/src/lib/export/records-backup.ts @@ -94,6 +94,13 @@ export interface LabResultBackupEntry { sourceReferenceLow: number | null; sourceReferenceHigh: number | null; sourceReferenceText: string | null; + /** + * @pending-consumer(#1095) The value and unit the source report printed, + * kept when a write converted it. Nothing writes them yet; the backup + * carries them so the conversion, when it lands, needs no backup change. + */ + sourceValue?: number | null; + sourceUnit?: string | null; takenAt: string; source: string; /** Human-readable cross-reference into `biomarkers` below, not an id. */ @@ -118,6 +125,8 @@ export interface BiomarkerBackupEntry { panel: string | null; hidden: boolean; context: string | null; + /** @pending-consumer(#1095) The catalogue key the name resolves to. */ + analyteKey?: string | null; createdAt?: string; updatedAt?: string; } @@ -414,6 +423,8 @@ export async function buildRecordsBackupSection( sourceReferenceLow: r.sourceReferenceLow, sourceReferenceHigh: r.sourceReferenceHigh, sourceReferenceText: r.sourceReferenceText, + sourceValue: r.sourceValue, + sourceUnit: r.sourceUnit, takenAt: r.takenAt.toISOString(), source: r.source, biomarkerName: r.biomarker?.name ?? null, @@ -438,6 +449,7 @@ export async function buildRecordsBackupSection( "biomarker context", decryptContextFromBytes, ), + analyteKey: b.analyteKey, })); const illnessEpisodes: CanonicalIllnessEpisode[] = disasterRecovery diff --git a/src/lib/export/restore-backup.ts b/src/lib/export/restore-backup.ts index 06eeeabf9..fe1e15d14 100644 --- a/src/lib/export/restore-backup.ts +++ b/src/lib/export/restore-backup.ts @@ -2048,6 +2048,7 @@ export async function restoreBackup( biomarker.context == null ? null : encryptContextToBytes(biomarker.context), + analyteKey: biomarker.analyteKey ?? null, ...(biomarker.createdAt ? { createdAt: new Date(biomarker.createdAt) } : {}), @@ -2154,6 +2155,8 @@ export async function restoreBackup( sourceReferenceLow: lab.sourceReferenceLow ?? null, sourceReferenceHigh: lab.sourceReferenceHigh ?? null, sourceReferenceText: lab.sourceReferenceText ?? null, + sourceValue: lab.sourceValue ?? null, + sourceUnit: lab.sourceUnit ?? null, takenAt: new Date(lab.takenAt), source: lab.source, noteEncrypted: diff --git a/tests/integration/backup-round-trip.test.ts b/tests/integration/backup-round-trip.test.ts index e9902833e..6ba296592 100644 --- a/tests/integration/backup-round-trip.test.ts +++ b/tests/integration/backup-round-trip.test.ts @@ -3628,13 +3628,7 @@ const COLUMN_EXCLUSIONS: Readonly> = { * starts coming back, so the entry has to go in the change that carries it. * The list is empty again before the release is tagged. */ -const LABS_V142 = - "v1.42 (#1095): the lab section carries the conversion provenance"; -const RELEASE_PENDING_COLUMNS: Readonly> = { - "Biomarker.analyteKey": LABS_V142, - "LabResult.sourceValue": LABS_V142, - "LabResult.sourceUnit": LABS_V142, -}; +const RELEASE_PENDING_COLUMNS: Readonly> = {}; /** * Columns every reader parses through one function before using, compared