mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 16:12:11 +00:00
feat(documents): review and extract lab values on the document itself
The server chain existed end to end (extract stages PENDING facts, per-fact
edit clears the low-confidence gate, confirm is the only write into the
structured stores) but the document detail offered no control over any of
it: it counted observation facts and linked to Labs. A user whose automatic
staging run was skipped had to re-upload the same PDF through Labs > Scan a
report.
- The detail sheet gains a staged-facts block with honest states: pending
facts open an inline review (approve/reject per fact; a low-confidence
fact is checked and saved first via the existing per-fact edit); a
lab-filed, already-read document with nothing staged offers "Extract lab
values" over its stored text; otherwise nothing renders.
- The extract route gains { mode: "stored" }: the same text-structuring
pass the automatic worker runs, over the document's own content index.
No re-upload, no second read of the original; full gauntlet including
the shared document-AI bucket with charge-at-dispatch honesty; 422
notIndexed when no stored text exists.
- A manual "Read with AI" / "Read again" now continues into the same
lab auto-staging the background worker performs; the response reports
labFactsStaged and the toast names the values waiting for review.
- Unchecked values are rejected and the copy says so; an unverified
low-confidence fact receives no decision and stays pending rather than
being silently discarded. Confirmation remains the only write into
Labs, conditions, and medications; approved facts carry the
committedRecordId link back to the source document (existing model, no
schema change).
- The "lab values from this document" link now counts APPROVED facts
only — it claims values that actually exist in Labs.
- Copy in all six locales; OpenAPI regenerated for the new extract mode
and the index response field.
This commit is contained in:
1 parent
8e16df6894
commit
fd104dd0ac
20 files changed
+1681
-64
No files matched your search
@@ -9567,6 +9567,7 @@
|
||||
"errorBudget": "Twój dzisiejszy budżet AI został wyczerpany.",
|
||||
"errorPdfNeedsVision": "Skanowanie plików PDF wymaga dostawcy wizji Claude.",
|
||||
"errorFileType": "Tego typu pliku nie można odczytać.",
|
||||
"errorNotIndexed": "Najpierw odczytaj dokument, potem wyodrębnij.",
|
||||
"errorLocalOcrDisabled": "Najpierw włącz lokalne OCR w ustawieniach AI.",
|
||||
"errorProvider": "Nie skonfigurowano dostawcy AI do tego celu.",
|
||||
"errorTextImageOnly": "Lokalne OCR odczytuje tylko obrazy, nie ten plik."
|
||||
@@ -9580,11 +9581,55 @@
|
||||
},
|
||||
"ai": {
|
||||
"readDone": "AI odczytało Twój dokument.",
|
||||
"readStagedOne": "AI odczytało Twój dokument. 1 wynik laboratoryjny czeka na Twoją weryfikację.",
|
||||
"readStagedFew": "AI odczytało Twój dokument. {count} wyniki laboratoryjne czekają na Twoją weryfikację.",
|
||||
"readStagedOther": "AI odczytało Twój dokument. {count} wyników laboratoryjnych czeka na Twoją weryfikację.",
|
||||
"read": "Odczytaj z AI",
|
||||
"reread": "Odczytaj ponownie",
|
||||
"reading": "Odczytywanie…",
|
||||
"notReadYet": "Ten dokument nie został jeszcze odczytany."
|
||||
},
|
||||
"review": {
|
||||
"title": "Przejrzyj odczytane wartości",
|
||||
"hint": "Zatwierdź to, co zgadza się z dokumentem. Niezaznaczone wartości zostaną odrzucone; nic nie zapisuje się bez Twojego potwierdzenia.",
|
||||
"openOne": "Przejrzyj odczytaną wartość",
|
||||
"openFew": "Przejrzyj odczytane wartości ({count})",
|
||||
"openOther": "Przejrzyj odczytane wartości ({count})",
|
||||
"includeAria": "Uwzględnij {value}",
|
||||
"type": {
|
||||
"OBSERVATION": "Wynik laboratoryjny",
|
||||
"CONDITION": "Schorzenie",
|
||||
"MEDICATION_STATEMENT": "Lek"
|
||||
},
|
||||
"statedRange": "podany zakres {range}",
|
||||
"needsCheck": "Sprawdź tę wartość z dokumentem, a potem ją zapisz.",
|
||||
"verify": "Sprawdź",
|
||||
"verifySave": "Zapisz wartość",
|
||||
"verifyInvalid": "Podaj nazwę oraz wartość liczbową albo wynik tekstowy, nie oba naraz.",
|
||||
"verifyFailed": "Nie udało się zapisać poprawki. Spróbuj ponownie.",
|
||||
"fieldName": "Nazwa",
|
||||
"fieldDate": "Data",
|
||||
"fieldValue": "Wartość",
|
||||
"fieldValueText": "Wynik (tekst)",
|
||||
"fieldUnit": "Jednostka",
|
||||
"fieldDose": "Dawka",
|
||||
"unverifiedNoteOne": "1 wartość wymaga jeszcze sprawdzenia i pozostaje w oczekiwaniu.",
|
||||
"unverifiedNoteFew": "{count} wartości wymagają jeszcze sprawdzenia i pozostają w oczekiwaniu.",
|
||||
"unverifiedNoteOther": "{count} wartości wymaga jeszcze sprawdzenia i pozostaje w oczekiwaniu.",
|
||||
"finish": "Zakończ przegląd",
|
||||
"confirmFailed": "Nie udało się zapisać przeglądu. Spróbuj ponownie.",
|
||||
"savedToastOne": "Zapisano 1 wartość.",
|
||||
"savedToastFew": "Zapisano {count} wartości.",
|
||||
"savedToastOther": "Zapisano {count} wartości.",
|
||||
"nothingSavedToast": "Przegląd zapisany. Nie dodano żadnych wartości.",
|
||||
"extract": "Odczytaj wyniki laboratoryjne",
|
||||
"extracting": "Odczytywanie…",
|
||||
"extractHint": "Korzysta z tekstu już odczytanego z tego dokumentu. Odczytane wartości czekają na Twoją weryfikację; nic nie zapisuje się automatycznie.",
|
||||
"extractEmpty": "Z tego dokumentu nie udało się odczytać żadnych wartości.",
|
||||
"failUnitRequired": "Wartość liczbowa potrzebuje jednostki, zanim będzie można ją zapisać.",
|
||||
"failUnitMismatch": "Podana jednostka nie zgadza się z zapisaną jednostką tego wskaźnika. Popraw ją i zakończ przegląd ponownie.",
|
||||
"failGeneric": "Nie udało się zapisać tej wartości."
|
||||
},
|
||||
"contentIndex": {
|
||||
"indexPrompt": "Udostępnij treść dokumentów do wyszukiwania.",
|
||||
"indexAll": "Zindeksuj wszystko do wyszukiwania",
|
||||
|
||||
Reference in new issue
Block a user