What the pair rule catches
- Written without the pair ruleseeded pair mishearings, each answered by a reflex yes
- 20/20
- Written with the pair rule
- 0/20
npx tsx scripts/measure/ab-gate.ts n = 20, text candidates
Synthetic data only. No real patients, no real prescriptions, and nothing here is clinical advice. The catalogues are public reference data and the gate is a software invariant, not a regulatory approval.
This project quotes ISMP, the FDA, the Joint Commission and 21 CFR. It is not affiliated with, endorsed by, or reviewed by any of them. Those citations establish that read-back is an existing requirement; they establish nothing about this software.
Do not enter real patient data into this application.
Readback is a voice agent that takes prescription orders. Every value carries the spoken words that produced it, the recognizer’s certainty over those words and an independent validator’s verdict, and it enters the order only when a validator passed it or the caller confirmed it aloud. What this cannot prove is stated as plainly.
A recognizer can be fully certain it heard morphine while the caller said hydromorphone. Certainty describes the acoustics, not which of two similar names was meant: a look-alike, sound-alike pair.
| Said | Heard | Recognizer certainty | Gate verdict | Threshold and validators only |
|---|---|---|---|---|
| hydromorphone | morphineon the ISMP list with hydromorphone | certainty 1.00outranked by the published pair | RE-ASKE_LASA_HIT | Written: morphine |
So a drug name on the published ISMP List of Confused Drug Names triggers a mandatory re-ask even at certainty 1.00, and the re-ask is contrastive: the agent names both drugs, and only a spoken name answers it, never a yes. This is a rule, not a threshold, and the product does not weaken it into one.
5 fields are always read back once, whatever else happens (E_READ_BACK_REQUIRED): drug name, strength, quantity, directions (sig) and patient name. The three reasons below change which question is asked, and only the third will not take a yes for an answer.
The lowest certainty across the source words fell under the threshold for that field. The minimum is used rather than the mean, because a mean hides the single failed word that happens to be the drug name.
| Said | Heard | Recognizer certainty | Gate verdict | Threshold and validators only |
|---|---|---|---|---|
| ten milligrams | ten milligrams | certainty 0.61 | RE-ASKE_LOW_CONFIDENCE | Also asks:E_LOW_CONFIDENCE |
A checksum, a catalogue lookup or an internal consistency check rejected the value. NPI and DEA are arithmetic; a drug name is proved by existing in the catalogue, and we say so rather than calling it a checksum.
| Said | Heard | Recognizer certainty | Gate verdict | Threshold and validators only |
|---|---|---|---|---|
| one two three four five six seven eight nine zero | one two three four five six seven eight nine zero | certainty 0.97 | REFUSEDE_VALIDATOR_CHECKSUM | Also asks:E_VALIDATOR_CHECKSUM |
This one fires even at certainty 1.00 and is read before the threshold, so a confident value cannot reach acceptance by being confident. The agent names both drugs, and only a spoken name answers.
| Said | Heard | Recognizer certainty | Gate verdict | Threshold and validators only |
|---|---|---|---|---|
| hydromorphone | morphineon the ISMP list with hydromorphone | certainty 1.00outranked by the published pair | RE-ASKE_LASA_HIT | Written: morphine |
The measured catch beside its cost, each with the command that produced it and the size of its set. The split by mechanism and the cost in seconds are on the measurements page.
npx tsx scripts/measure/ab-gate.ts n = 20, text candidates
make coverage-matrix n = 59, recorded confidences from synthesised speech through the live recognizer, scored against the full 2023 ISMP list
| Figure | Value | Input | Command | n |
|---|---|---|---|---|
| Distinct pairs in the full 2023 ISMP list, the product rule | 514 | text | npx tsx scripts/measure/ismp-coverage.ts | 514 |
| Catalogue drugs carrying a name on the ISMP list | 502 of 3730 (13.5%) | text | npx tsx scripts/measure/ismp-coverage.ts | 3730 |