Extracting data from prescription history reports
Prescription history reports list the fills dispensed to one person, with summary scores above the detail. State monitoring programs and commercial underwriting databases each print their own layout. Life underwriters order one for almost every applicant, and clinicians check one before prescribing, receiving each as a PDF or a portal screen.
Reviewers need each drug, its strength and quantity, the days supply, the prescriber, the pharmacy and the fill dates. An underwriting rules engine maps each drug to likely conditions and decides whether the case needs an underwriter's review.

What makes prescription history reports hard
Scores sit beside their captions
Summary scores print as bare numbers in boxes or tiles, and only the caption beside each says whether it counts prescribers, fills or dose.
One cell holds three fields
Prescriber and pharmacy cells pack a name, an address and a registration number onto stacked lines inside a single table cell.
Repeat fills look like duplicates
A monthly refill repeats the same drug from the same pharmacy a month apart, and each row has to stay a separate fill.
Parse, extract, verify
Parse
Parse turns the document into reading-order Markdown and a hierarchy of blocks (text, tables, figures), and grounds each block to its exact location on the page.
Extract
You define the fields in a JSON schema, and Extract returns their values in a consistent, structured format, each linked back to where it appears in the Markdown.
Verify
Each value links back to where it appears, down to the character range in the Markdown, and the page and bounding box in the source document, so every result can be verified.
One prescription history report, end to end
About this document: A sample patient report from a prescription drug monitoring program, published with fictitious data by the PDMP Training and Technical Assistance Center in its program overview. Its one landscape page, supplied as an image, is featured. Four summary indicator tiles sit above a patient row and a dispensation table of seven fills. Every fill row names its prescriber and its dispensing pharmacy.
Processing objective: The objective is to read the risk summary at the top of the report and link it to the fill list beneath. Each indicator is a bare number in a colored tile, with its meaning in the caption. The dispensed drug comes from the second row of the table.
Demonstration fields: MME (30-day average), Prescribers in 6 months, Overlapping prescriptions, Risk score, Dispensed drug
The document
1 page
Page 1shown below
Where each value came from

risk_indicators.mme_average
{
"value": 66.04,
"page": 1,
"range": {
"end": 40,
"start": 0
},
"box": {
"xmin": 0.15926,
"ymin": 0.01772,
"xmax": 0.31322,
"ymax": 0.14787
}
}risk_indicators.multiple_provider_prescribers
{
"value": 8,
"page": 1,
"range": {
"end": 97,
"start": 41
},
"box": {
"xmin": 0.33633,
"ymin": 0.01621,
"xmax": 0.48989,
"ymax": 0.149
}
}risk_indicators.overlapping_prescriptions
{
"value": 4,
"page": 1,
"range": {
"end": 143,
"start": 98
},
"box": {
"xmin": 0.51395,
"ymin": 0.01567,
"xmax": 0.669,
"ymax": 0.1494
}
}risk_indicators.risk_score
{
"value": 5,
"page": 1,
"range": {
"end": 171,
"start": 144
},
"box": {
"xmin": 0.69194,
"ymin": 0.01559,
"xmax": 0.82308,
"ymax": 0.14958
}
}prescriptions[1].drug
{
"value": "Hydrocodone",
"page": 1,
"range": {
"end": 1177,
"start": 1166
},
"box": {
"xmin": 0.70612,
"ymin": 0.44568,
"xmax": 0.81373,
"ymax": 0.53346
}
}How to try it yourself
Everything on this page is reproducible. The sample, its schema, and the Parse and Extract API outputs are published. You can repeat the same two calls from whichever surface you already build on.
- Claude Skilldescribe the job; the agent writes it
- CLIno code at all
- MCPexpose ADE docs as an agent tool
- REST APIany language
- Pythonlandingai-ade
- TypeScriptlandingai-ade
Documents into data
Accurate
The best accuracy on the difficult documents other tools get wrong, such as messy scans, complicated tables, checkboxes and handwriting.
Auditable
Every answer cites its sources. Values come back with an audit trail (page, bounding box, character range) so a human can review them.
Agentic
Applies multi-step reasoning, and plans before it acts. Handles documents it has never seen before and adapts to variations.
API-first
Composable APIs that drop into any tech stack and can be called from anywhere. Easy to build on and embed in your pipelines and products.
Affordable
Cost-competitive rates with complete price transparency. Spend controls before you run, and every job reports its exact cost.
Enterprise-grade
Built for production and scale from day one. Fully observable and monitored, running securely in our cloud or yours.
Built for high-volume, high-throughput production
- Zero data retention
- Priority rate limits
- Enhanced support
- VPC and on-prem deployment
Available on Team and Enterprise plans. VPC and on-prem deployment require an Enterprise plan.
