refactor: Clean up OCR debug table structure and remove redundant regex checks

This commit is contained in:
Ross
2026-05-11 12:32:54 +01:00
parent f9a9b9bb38
commit 35887fbcaf
-7
View File
@@ -754,13 +754,6 @@
return getOcrPhiReasons(text).length > 0;
}
return /(ref|rk9|rh8|ra9|rbz|rba)\d+/i.test(value)
|| /\b\d{3}[\s-]?\d{3}[\s-]?\d{4}\b/.test(value)
|| /\b\d{10}\b/.test(value)
|| /\b\d{6,8}\b/.test(value)
|| /\b(?:dob|d\.o\.b|birth|born)\b/.test(value);
}
function buildOcrSamples(records) {
const includeRecords = records.filter((record) => record.include);
const seriesMap = {};