Technology
Teach the pipeline what a document means, not what to output
The lesson that shaped this system came from a regression: CPAP compliance records were satisfying a sleep-study requirement. The fix was not a patch on the output. It was teaching the detector the difference.
- Conditions with a readiness framework
- 113Conditions with a readiness framework
- Clinical terms in the medical vocabulary
- 4.9MClinical terms in the medical vocabulary
- Stages of clinical language processing
- 5Stages of clinical language processing
- Typical eFolder fully analyzed
- ~90 secTypical eFolder fully analyzed
The core architecture rule
Detectors emit facts. Policy consumes them.
Keeping these apart is what makes the result auditable, and what stops a confident-sounding model from quietly deciding a veteran's claim.
Detectors
This looks like a sleep study. This contains an audiogram. This DD-214 records a combat medal. Detectors describe documents. They never decide a tier.
Policy
Condition specifications written from the rating criteria define required elements, blockers and weights. Policy never parses documents.
The result
Tier, readiness, blockers and gaps all come from one engine, so the surfaces cannot contradict each other.
A consequence worth stating plainly: if a condition requires a diagnostic study and the file does not contain one, no amount of adjacent evidence makes it ACE-ready. The system reports the gap instead of averaging it away.
Clinical language processing
Five stages, each a pure step
Every stage has one job and hands the next one a typed result, which is why any single stage can be tested in isolation.
Stage 1
Prepare and weight
Section headers are detected and every sentence inherits the weight of the section it sits under. A concept under Assessment is almost always a real finding. The same concept under Family History is almost always somebody else's condition.
Stage 2
Generate candidates
Phrases are extracted and cheap filtering happens early: stopword-only phrases and bare digits are dropped before any expensive matching. Structured clinical codes are extracted separately, because a code is unambiguous by construction.
Stage 3
Match against clinical vocabulary
Candidates are matched against millions of clinical terms, synonyms and abbreviations, using fuzzy matching that survives OCR damage and spelling variation. Short, ambiguous tokens are held back from fuzzy matching entirely.
Stage 4
Resolve context
Each match is checked for negation, whose condition it is, whether it is historical, whether it is uncertain, and whether an ambiguous abbreviation is being read correctly for its surroundings.
Stage 5
Score and filter
Confidence combines match strength, section weight, and the context multipliers. Negated and family-history mentions are capped so low they cannot survive the filter. What remains is deduplicated and ranked.
Guardrails
The cases that break naive matching
Each of these is a real rule with a test behind it, not an illustration.
| In the document | What the pipeline does |
|---|---|
| MI, in a service record | Rejected. Military context, not myocardial infarction. |
| MI, in a cardiac note | Accepted. The surrounding text is clinical. |
| APR 12, 2024 | Rejected as a medical concept. That is a date. |
| Middle initial | Rejected. It must not become middle ear. |
| 1000, 2000, 4000 on an audiogram | Read as frequencies, not concepts. |
| TINITUS | Matched to tinnitus. OCR damage survives. |
How rules change
Measured failures first, then the fix
Improvements start from a measured failure: a corpus miss, a false positive, a readiness contradiction. A failing test is added that captures it. Then the fix goes into the lowest correct layer, and the corpus is re-run.
Condition rules are versioned and tested against a reference corpus on every change, so a change that helps one condition cannot silently damage another.
Measured against our reference corpus
These are controlled corpus figures, not a real-world accuracy rate. Real-world accuracy requires labeled real documents and outcome comparison. We publish the measurement and the method, not a headline number we cannot defend.
Next step
Want the deeper technical detail?
We can walk through the evidence model, the condition specifications, the provenance design and the deployment boundary.