feat(ocr): RCA expiry parsing from OCR text (MVP v0.3)#1
Draft
loquit-tud wants to merge 2 commits into
Draft
Conversation
- Add RomanianDocumentParser for RCA validity ranges and Romanian date formats - Wire gallery import through ParsingDocumentFieldExtractor (suggestions only) - Debug-only [OCR] logcat logging; RCA-specific confirm banner messages - Unit tests for parser and RCA OCR flow; QA doc MVP v0.3 Co-authored-by: loquit-tud <loquit-tud@users.noreply.github.com>
Loading after gallery pick+OCR completed was misleading; overlay stays only for fake scan flow. Co-authored-by: loquit-tud <loquit-tud@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves RCA / insurance expiry date extraction from OCR text via a pure-Dart
RomanianDocumentParser. OCR remains a suggestion only — confirm screen requires user verification before save.Root cause
ImportFromGalleryUseCasehad no extractor).FakeDocumentFieldExtractorreturned a hardcodednow + 90 dayswithout parsing validity ranges.Valabilitate: start - end,de la … până la …, etc.).Changes
RomanianDocumentParser: date formatsdd.MM.yyyy,dd/MM/yyyy,dd-MM-yyyy,yyyy-MM-dd; RCA keyword proximity; end-of-range selection; debug logging[OCR]in debug builds only.FakeOcrTextRecognitionService→ParsingDocumentFieldExtractor→ confirm draft withOcrExpirySuggestion.docs/QA_MVP_V0_3.md.QA
See
docs/QA_MVP_V0_3.md. Real gallery photos still need on-device ML Kit; empty OCR → manual expiry.Verification
flutter analyze— no issuesflutter test— 38 passed