Mirrors the utility statement intake on the insurance side: a policy_ocr batch/document pair of tables, a GMX parser, a matcher keyed on Policy.policyNumber, and a "Captura" screen under /polizas that proposes policy -> customer for staff to confirm. Lifts the OCR seam out of StatementsModule into its own OcrModule so PolicyOcrModule can inject OCR_PROVIDER without taking on the rest of the statement pipeline; StatementsModule now imports it and binds nothing itself. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
18 lines
711 B
TypeScript
18 lines
711 B
TypeScript
import { Module } from "@nestjs/common";
|
|
import { OCR_PROVIDER } from "../statements/ocr/ocr.provider";
|
|
import { TesseractOcrProvider } from "../statements/ocr/tesseract.provider";
|
|
|
|
/**
|
|
* Lifts the OCR seam out of StatementsModule so other modules (today:
|
|
* PolicyOcrModule) can inject OCR_PROVIDER without taking on the rest of
|
|
* the statement intake. StatementsModule itself imports this and gets the
|
|
* provider the same way.
|
|
*
|
|
* The concrete engine is still bound here — Tesseract today, a managed
|
|
* extraction API later is a one-line change in this file.
|
|
*/
|
|
@Module({
|
|
providers: [{ provide: OCR_PROVIDER, useClass: TesseractOcrProvider }],
|
|
exports: [OCR_PROVIDER],
|
|
})
|
|
export class OcrModule {} |