*** September 2026 Major Release ***Read and watch
Document type

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.

Page 1 of a sample Prescription History Report, with extracted values outlined
2,809Markdown characters
103parse blocks
120fields extracted
The problem

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.

How it works

Parse, extract, verify

1

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.

2

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.

3

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.

Worked example

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 1 of the sample Prescription History ReportPage 1shown below

Where each value came from

Page 1 of the sample Prescription History Report, with every featured field outlined
MME (30-day average)risk_indicators.mme_average
66.04
The region of the sample Prescription History Report containing MME (30-day average), with the extracted value outlined
extraction_metadata["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
  }
}
Prescribers in 6 monthsrisk_indicators.multiple_provider_prescribers
8
The region of the sample Prescription History Report containing Prescribers in 6 months, with the extracted value outlined
extraction_metadata["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
  }
}
Overlapping prescriptionsrisk_indicators.overlapping_prescriptions
4
The region of the sample Prescription History Report containing Overlapping prescriptions, with the extracted value outlined
extraction_metadata["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 scorerisk_indicators.risk_score
5
The region of the sample Prescription History Report containing Risk score, with the extracted value outlined
extraction_metadata["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
  }
}
Dispensed drugprescriptions[1].drug
Hydrocodone
The region of the sample Prescription History Report containing Dispensed drug, with the extracted value outlined
extraction_metadata["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
Why LandingAI?

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.

Compare plans
Capabilities

Prescription History Report processing highlights

Summary risk indicators
Every dispensed fill
Drug, strength and quantity
Days supply and refills
Prescriber name and DEA number
Dispensing pharmacy details
Issued, filled and sold dates
Multi-line table cells
Repeated fills kept separate
Indicator values and periods
Image and PDF reports
Bounding box for every value
FAQs

Questions, answered

Yes. Define the fills as an array in your schema. Each dispensed row comes back as its own entry, so a monthly refill of the same drug from the same pharmacy is recorded every time it appears.

Yes. Parsing keeps the line breaks inside each table cell, so a schema can ask for each line of the prescriber's details as its own field. Each comes back from the same cell.

Yes. Image files such as PNG and JPEG parse the same way as PDFs. Grounding coordinates come back against the image, so a screenshot from a vendor portal gives a reviewer the same evidence as a PDF export.

Every extracted value carries the character range it was quoted from in the parsed Markdown. The Ground API maps that range to a page and a bounding box, so a reviewer sees each score in the tile that printed it.

Accounts are available with zero data retention, which deletes results as soon as they are retrieved. With it enabled and a Business Associate Agreement in place, ADE supports HIPAA-compliant processing of protected health information.

Start extracting prescription history report data

Reliable, structured outputs with full traceability in minutes