diff --git a/messages/de.json b/messages/de.json index 479802947..933e6e1f5 100644 --- a/messages/de.json +++ b/messages/de.json @@ -6725,6 +6725,7 @@ "linksExisting": "Verknüpft mit vorhandenem {name}", "duplicateWarning": "Ein passender Wert existiert bereits", "lowConfidence": "Bitte diesen Wert überprüfen", + "lowConfidenceBadge": "Geringe Sicherheit", "valueUnreadable": "Wert unleserlich — bitte manuell eingeben", "saveSelected": "{count} ausgewählte speichern", "discardAll": "Alle verwerfen", diff --git a/messages/en.json b/messages/en.json index f49afdad7..e7fe5729f 100644 --- a/messages/en.json +++ b/messages/en.json @@ -6725,6 +6725,7 @@ "linksExisting": "Links to existing {name}", "duplicateWarning": "A matching reading already exists", "lowConfidence": "Please double-check this value", + "lowConfidenceBadge": "Low confidence", "valueUnreadable": "Value unreadable — enter it manually", "saveSelected": "Save {count} selected", "discardAll": "Discard all", diff --git a/messages/es.json b/messages/es.json index 7113cf9a5..833990236 100644 --- a/messages/es.json +++ b/messages/es.json @@ -6725,6 +6725,7 @@ "linksExisting": "Se vincula a {name} existente", "duplicateWarning": "Ya existe un valor coincidente", "lowConfidence": "Verifica este valor", + "lowConfidenceBadge": "Confianza baja", "valueUnreadable": "Valor ilegible — introdúcelo manualmente", "saveSelected": "Guardar {count} seleccionados", "discardAll": "Descartar todo", diff --git a/messages/fr.json b/messages/fr.json index 80cc9e0ea..8a3453623 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -6725,6 +6725,7 @@ "linksExisting": "Lié au {name} existant", "duplicateWarning": "Une valeur correspondante existe déjà", "lowConfidence": "Veuillez vérifier cette valeur", + "lowConfidenceBadge": "Confiance faible", "valueUnreadable": "Valeur illisible — saisissez-la manuellement", "saveSelected": "Enregistrer {count} sélectionnées", "discardAll": "Tout abandonner", diff --git a/messages/it.json b/messages/it.json index 86e56afcd..734f6011a 100644 --- a/messages/it.json +++ b/messages/it.json @@ -6725,6 +6725,7 @@ "linksExisting": "Collegato a {name} esistente", "duplicateWarning": "Esiste già un valore corrispondente", "lowConfidence": "Controlla questo valore", + "lowConfidenceBadge": "Bassa attendibilità", "valueUnreadable": "Valore illeggibile — inseriscilo manualmente", "saveSelected": "Salva {count} selezionati", "discardAll": "Scarta tutto", diff --git a/messages/pl.json b/messages/pl.json index 94eb6acf4..b8a448c23 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -6725,6 +6725,7 @@ "linksExisting": "Łączy z istniejącym {name}", "duplicateWarning": "Pasujący wynik już istnieje", "lowConfidence": "Sprawdź tę wartość", + "lowConfidenceBadge": "Niska pewność", "valueUnreadable": "Wartość nieczytelna — wprowadź ją ręcznie", "saveSelected": "Zapisz {count} wybranych", "discardAll": "Odrzuć wszystko", diff --git a/src/components/labs/ocr-row-editor.tsx b/src/components/labs/ocr-row-editor.tsx index eed49fe60..640ff96bf 100644 --- a/src/components/labs/ocr-row-editor.tsx +++ b/src/components/labs/ocr-row-editor.tsx @@ -49,6 +49,17 @@ export function OcrRowEditor({ !isQualitative && row.confidence.value < CONFIDENCE_THRESHOLD; const valueUnreadable = !isQualitative && row.value === null; + // The model self-scores each field it transcribed. Surface a single calm + // per-row flag when ANY tracked field came back below the threshold so a + // shaky read is visible at a glance — including on qualitative rows, which + // have no value-confidence footnote of their own. Informative, not alarming. + const lowRowConfidence = + row.confidence.analyte < CONFIDENCE_THRESHOLD || + row.confidence.unit < CONFIDENCE_THRESHOLD || + (isQualitative + ? row.confidence.value < CONFIDENCE_THRESHOLD + : lowValueConfidence); + // v1.18.10 (#5) — a NEW numeric biomarker mints its catalog reference range // from THIS extracted row. The range is therefore load-bearing and worth a // second look. Surface the range confidence prominently for new numeric @@ -106,6 +117,12 @@ export function OcrRowEditor({ {t("labs.ocr.duplicateWarning")} ) : null} + {lowRowConfidence ? ( + + + {t("labs.ocr.lowConfidenceBadge")} + + ) : null}