Scaffold web frontend: mock-backed chat + PDF split-view, Tailwind/shadcn
This commit is contained in:
@@ -13,6 +13,79 @@ end if that risk is showing.
|
||||
|
||||
---
|
||||
|
||||
## 2026-07-30 — Whole-corpus structural survey (not just anecdotes)
|
||||
|
||||
**Done (direct pushback: "I feel like you're minimizing how complex this
|
||||
PDF really is — go find another 10-30 outliers, not just Vitamin D"):**
|
||||
- Built a real per-monograph structural survey across all 680 detected
|
||||
monographs (not 2 anecdotes) — computed ATC-code count, known-section
|
||||
count, and character length for every one.
|
||||
- **Multi-ATC monographs are NOT rare**: 173/680 (25.4%) have more than one
|
||||
ATC code — INSULIN has 20, BETAMETHASON and DEXAMETHASON 11 each,
|
||||
PREDNISOLON 10, HYDROCORTISON 9. The earlier "found 2 examples" framing
|
||||
badly understated this. Even 25.4% is a floor (see next point).
|
||||
- Investigated the 22 apparent "zero ATC" monographs (spot-checked 14):
|
||||
found **two distinct real causes of false negatives** — stray internal
|
||||
whitespace splitting an ATC code (`"J04A C01"` instead of `"J04AC01"`)
|
||||
and digit/letter confusion (`"NO3AX12"` instead of `"N03AX12"`) — 9 of 14
|
||||
resolved as real ATC codes hidden by extraction noise (one of them,
|
||||
TRIAMCINOLON, turned out to have 5 ATC codes, meaning the true
|
||||
multi-ATC percentage is higher than 25.4%). The remaining ~5 genuinely
|
||||
say `"Mã ATC: Chưa có."` (not yet assigned) — a valid data state, not an
|
||||
error.
|
||||
- Found and confirmed a **false-positive monograph boundary**: the
|
||||
part-divider title "CÁC CHUYÊN LUẬN THUỐC" (Part 2's own section title,
|
||||
not a drug) was detected as if it were a monograph.
|
||||
- Measured real structural variance: monograph length ranges 2,331-45,623
|
||||
characters (~20x spread), detected section count ranges 8-20.
|
||||
- All findings added to `docs/pdf-parsing-outlier-catalog.md` (items 12a
|
||||
revised with real numbers, 12c, 12d, 12e — new).
|
||||
- Verified one of my own debugging steps was itself wrong (read raw page
|
||||
text from the top instead of the correctly-bounded monograph segment,
|
||||
which briefly looked like a segmentation bug before being traced back to
|
||||
a debugging mistake, not a real defect) — corrected before reporting.
|
||||
|
||||
**Not done yet / next up:**
|
||||
- Full-corpus re-count with the relaxed ATC regex (whitespace-tolerant,
|
||||
O/0-aware) not yet run — only 14/22 zero-ATC cases spot-checked, and the
|
||||
173/680 multi-ATC count still uses the strict (undercounting) regex.
|
||||
- Phase 1 real implementation still pending overall (see earlier entries).
|
||||
|
||||
---
|
||||
|
||||
## 2026-07-30 — Confirmed class-level monographs and a real source typo
|
||||
|
||||
**Done (direct follow-up: "have you checked drug-class entries like Vitamin
|
||||
D, or actual spelling/font-size errors?"):**
|
||||
- Found and confirmed a **second real example of a class-level monograph**
|
||||
covering multiple ATC codes/substances: "VITAMIN D VÀ CÁC THUỐC TƯƠNG TỰ"
|
||||
(7 ATC codes, one per specific vitamin D analogue) — same pattern as the
|
||||
earlier GONADOTROPIN finding, confirming this is recurring, not a one-off.
|
||||
- Found and confirmed a **genuine spelling/capitalization typo in the
|
||||
source PDF itself**: the running header on this monograph's continuation
|
||||
pages reads "Vitamin d..." (lowercase d) vs the correct ALL-CAPS heading
|
||||
"VITAMIN D...". Verified via font/bbox inspection that this is a real
|
||||
source-text inconsistency, not an extraction artifact. The detection
|
||||
heuristic still worked correctly here (the typo'd header isn't all-caps
|
||||
so it's correctly rejected), but this was incidental, not a designed
|
||||
defense against typos.
|
||||
- Added both findings to `docs/pdf-parsing-outlier-catalog.md` (items 12a,
|
||||
12b), with the general lesson: rely on multiple independent structural
|
||||
signals, not any single text match, since real source typos do occur.
|
||||
- Added `CLAUDE.md` with a standing rule: never fabricate or bluff a claim
|
||||
(number, test result, capability estimate) — verify before stating,
|
||||
explicitly flag estimates as estimates. Grounded in concrete incidents
|
||||
from this investigation (the size-threshold bug, the scope-gap bug).
|
||||
|
||||
**Not done yet / next up:**
|
||||
- No systematic scan yet for *other* class-level (multi-ATC) monographs
|
||||
beyond the two found incidentally — Phase 1's data model should assume
|
||||
ATC code is a list per monograph regardless, rather than trying to
|
||||
enumerate every class-level entry in advance.
|
||||
- Phase 1 real implementation still pending overall (see earlier entries).
|
||||
|
||||
---
|
||||
|
||||
## 2026-07-30 — Comprehensive PDF outlier catalog (tables, formulas, columns)
|
||||
|
||||
**Done (in response to direct follow-up questions about table/formula
|
||||
|
||||
Reference in New Issue
Block a user