How to Extract Dates from Medical Records PDFs (and Keep the Right One)
Hello, and welcome to everyone who has typed a visit date into a chronology and then noticed it was the fax date.
Picture a records packet where every visit already sits on the right date, and nobody had to squint at a fax header to find it.
In most small personal injury and disability practices, a paralegal still opens each page, finds the visit date among five or six others, and types it into the chronology.
The hard part is not reading a date. It is knowing which of the dates on that page is the day the patient was actually seen.
Short answer: To extract dates from a medical records PDF, run the PDF through OCR or a vision AI model, pull every date on each page, label it (service, injury, admission, discharge, signature, fax or birth date), convert it to YYYY-MM-DD, keep the date of service with its page citation, and send conflicting or unclear dates to a paralegal.
Which dates are in a medical records PDF?
A single page of a medical records PDF usually carries four to six dates, and only the date of service and the date of injury build the case timeline.
ChartRequest’s October 29, 2026 guide lists seven record dates worth tracking and puts the rule plainly: a signature date should not automatically replace the date of service.
| Date on the page | Where it appears | Use in a chronology |
|---|---|---|
| Date of service (encounter date) | Visit note header, CMS-1500 box 24A, UB-04 form locator 45 | The date of the row. Every entry is sorted by it. |
| Date of injury or onset | History of present illness, CMS-1500 box 14 | Anchors the whole timeline and the first-treatment gap |
| Admission and discharge dates | Hospital face sheet, discharge summary, UB-04 form locator 12, CMS-1500 box 18 | Gives an inpatient stay its start and end |
| Order, study and report dates | Imaging and lab reports | Keep the study date for the row; the report date is a note |
| Dictation and signature dates | Footer of the note, e-signature line | Note only. Never the date of the visit |
| Addendum or late-entry date | Below the signature | Note only, but flag it for the attorney |
| Fax, print and request dates | Fax header, page footer, cover letter | Skip. They show when the copy was sent |
| Date of birth | Patient header on every page | Skip for the timeline; use it to confirm the right patient |
The table is the whole job in one view: find all of these, keep two, note three, and throw the rest away.
Why does OCR pull the wrong date from medical records?
OCR pulls the wrong date from medical records because it reads every date on the page equally well and has no idea which one means the visit happened here.
CaseAgent’s chronology guide warns that Dictation dates run days behind and will invent gaps that are not there.
A note dictated on March 6 for a March 4 visit moves the visit two days, and a batch of late signatures can stretch a steady course of therapy into an apparent pause.
Fax and print dates are worse. A whole packet faxed on November 2 carries “11/02/26” on every page, and a simple date grabber will happily report 41 visits on one day.
Format causes the rest of the trouble:
- Two-digit years. “2/27/26” needs a century before it can be sorted.
- Day-first dates. Records from outside the US, common in immigration files, often write 03/04/2026 for 3 April, not March 4.
- Relative dates. “Three days ago” or “since the accident” only means something next to the note’s own date of service.
- Many visits on one page. Physical therapy flowsheets and medication logs list a dozen dates in one table.
- Handwriting. Chiropractic and therapy notes are often handwritten, and a 1 and a 7 look alike.
So date extraction from medical records is half reading and half labelling. Reading is cheap now. Labelling is where the rules, and your paralegal, come in.
Where are the dates on a CMS-1500 or UB-04 medical bill?
On medical bills, the dates sit in fixed, numbered boxes, which makes bills the easiest pages in a records packet to date automatically.
Physicians and clinics bill on the CMS-1500 form, whose boxes are defined in the NUCC 1500 Claim Form Reference Instruction Manual (version 13.0, July 2025). Hospitals bill on the UB-04, set out in the CMS Medicare Claims Processing Manual, chapter 25.
| Form and box | Official title | Format | Why a PI file cares |
|---|---|---|---|
| CMS-1500 box 3 | Patient’s Birth Date | MM DD YYYY | Confirms the right patient |
| CMS-1500 box 14 | Date of Current Illness, Injury, or Pregnancy (LMP) | MM DD YY or MM DD YYYY, with qualifier 431 for onset | The provider’s own date of injury |
| CMS-1500 box 16 | Dates Patient Unable to Work in Current Occupation | From and to dates | Supports the lost wage claim |
| CMS-1500 box 18 | Hospitalization Dates Related to Current Services | Admission and discharge dates | Ties office visits to a hospital stay |
| CMS-1500 box 24A | Date(s) of Service, lines 1 to 6 | MM DD YY, from and to | One billed date per line, matched to the notes |
| UB-04 form locator 6 | Statement Covers Period (From-Through) | MMDDYY | The span the hospital bill covers |
| UB-04 form locator 12 | Admission/Start of Care Date | MMDDYY | Inpatient admission date |
| UB-04 form locator 45 | Service Date | MMDDYY per line | Line-level date for each outpatient charge |
The NUCC manual describes box 24A as the actual month, day, and year the service(s) was provided
. It also allows grouping identical services on consecutive days on one line, so a single from 03/04/26 to 03/08/26
line can stand for five therapy visits.
That is why a good pipeline reads bills and notes separately, then matches every billed date to a note. A bill with no matching note is a records request waiting to happen.
How long does it take to log dates from medical records by hand?
Logging dates from medical records by hand takes about eight hours for a 1,000 page packet if each page needs only 30 seconds to find and type the right date.
| Pages in the packet | Hours by hand at 30 seconds a page | Wage cost at $30.24 an hour | Amazon Textract Queries | Claude Sonnet 5.5 |
|---|---|---|---|---|
| 300 | 2.5 | $76 | $4.50 | $2.29 to $3.19 |
| 1,000 | 8.3 | $252 | $15.00 | $7.64 to $10.64 |
| 2,500 | 20.8 | $630 | $37.50 | $19.09 to $26.59 |
Assumptions: 30 seconds a page to spot the date of service among the others and key it in, the US median paralegal wage of $30.24 an hour from the Bureau of Labor Statistics (May 2025), without benefits or overhead.
Machine costs use public list prices. Amazon Textract lists $0.015 a page for Analyze Document Queries on the first million pages a month. Claude Sonnet 5.5 lists $2 per million input tokens and $10 per million output tokens.
The Claude range uses Anthropic’s own estimate of 1,500 to 3,000 text tokens a page plus up to 1,568 image tokens a page, and our assumption of 150 output tokens a page for the date list. Anthropic’s Batch API halves those prices for work that can wait.
The reading is the cheap part. What costs real time is the review of flagged pages, which depends on how many handwritten and faxed pages your providers send.
How do you extract dates from a medical records PDF automatically?
You extract dates from a medical records PDF automatically in five steps: find every date, label each one, normalize it, check the dates against each other, and write or flag.
- Find. OCR or a vision AI model reads each page of the scanned PDF and lists every date it sees, with the words around it and its page number.
- Label. Each date gets a type from the table above, decided by its label (“DOS”, “Admit”, “Dictated”, “E-signed”) and its place on the page, such as a fax header or a bill box.
- Normalize. Every date is rewritten in the ISO 8601 form YYYY-MM-DD, so “2/27/26”, “Feb 27, 2026” and “27.02.2026” all sort the same way.
- Check. Rules compare the dates on the page and across the packet: injury before treatment, service before signature, every billed date matched to a note.
- Write or flag. Clean dates go into the chronology with their page citation. Anything uncertain waits for a paralegal with the page image beside it.
The diagram’s sample page shows six dates: a fax date of 11/02/26 (skip), a birth date of 04/17/1981 (skip), a date of service of 03/04/2026 (keep), a date of injury of 2/27/26 in the history (keep), a dictation date of 03/06/2026 and a signature date of 3/9/2026 (note only).
The sample page is invented for illustration. On a real file, the same five steps run on every page of the packet before anyone opens it.
Which tools can pull dates out of medical records?
Four general cloud services can pull dates out of medical records today, and two of them only read text, so they need OCR in front of them.
The quiet win of a labelled date list is trust. When every row carries the words it came from and its page, nobody has to wonder which of the six dates was used.
| Service | What it does with dates | What you still build |
|---|---|---|
| Amazon Textract Queries | Answers plain questions on a scanned page, such as What is the date of service?, with a confidence score and the answer’s location | The list of questions per page type and the date labelling rules |
| Amazon Comprehend Medical | Finds TIME_EXPRESSION entities, including “three days ago” and “day of admission”, tied to a medication, condition, test, procedure or treatment | OCR first; it reads text only, and returns a time expression only when it is linked to a medical entity |
| Azure AI Language, Text Analytics for health | Tags DATE (a full date tied to a condition, exam, treatment, medication or administrative event) and TIME entities | OCR first, such as Azure AI Document Intelligence, then your own date typing |
| Claude PDF support | Reads each page as text plus an image, so it can be asked to list every date with its type, page and quoted context in one JSON answer | Splitting large packets (up to 600 pages a request) and the checks below |
Amazon’s documentation is honest about the limit of entity tools: in Comprehend Medical, a date counts only if they are associated with an entity
. A fax header date has no medicine or diagnosis attached, so it is silently skipped, which is helpful, and so is a bare visit date in a header, which is not.
A vision model sees the layout too. Anthropic’s documentation says Because Claude receives an image of each page, you can ask for insights on visual elements of a PDF
, which is how a stamp, a fax strip or a handwritten date in a margin gets its correct label.
Finished products bundle these steps with a chronology on top. Medical chronology software for personal injury such as EvenUp, Filevine MedChron and Supio sorts records by date of service for you.
What should the extracted date data look like?
Each extracted date should become one small record with the date, its type, the page, the words it came from and a confidence flag.
{ "date": "2026-03-04", "type": "date_of_service",
"provider": "Valley Orthopedics", "page": 3, "bates": "LFA-000183",
"source_text": "Date of service: 03/04/2026",
"also_on_page": [
{"date": "2026-02-27", "type": "date_of_injury", "source_text": "MVC on 2/27/26"},
{"date": "2026-03-09", "type": "signature_date", "source_text": "E-signed 3/9/2026"}
],
"confidence": "high", "needs_review": false }
Keeping the quoted source text matters. When an adjuster disputes a date, your paralegal clicks the Bates number, sees the exact words and the page, and the argument is over.
The same records feed the next jobs. A dated, cited list is what a legal document indexing and summarization tool sorts into an index and what lets you automate demand letter drafting from a checked timeline.
What checks catch a wrong date before it reaches the demand?
Seven checks catch most wrong dates before they reach a chronology, and any failure sends the page to a person instead of the timeline.
- No date of service falls before the date of injury, unless the row is marked as a prior visit.
- No date of service falls after the dictation or signature date on the same note.
- The same date does not appear on every page of a packet; if it does, it is a fax or print date.
- Every billed date in CMS-1500 box 24A or UB-04 form locator 45 has a matching visit note, and every visit has a bill.
- The date of birth on each page matches your client, so another patient’s page does not slip into the file.
- Day-first and two-digit-year dates are flagged whenever both readings are possible, such as 03/04/2026 from a foreign provider.
- Any gap of 30 days or more between visits is listed for a person to explain, not filled in by the software.
Is it safe to send medical records PDFs to an AI service?
Sending medical records PDFs to an AI service is safe when the service is covered by a business associate agreement or equivalent terms, does not train on your files, and your firm follows its bar’s guidance on client consent.
Dates themselves are protected. The HIPAA de-identification rule at 45 CFR 164.514 lists All elements of dates (except year) for dates directly related to an individual
as identifiers, naming birth, admission, discharge and death dates.
So the very data this pipeline extracts is health information. Amazon Textract and Amazon Comprehend Medical are on the AWS HIPAA eligible services list, which AWS says applies only after an AWS business associate agreement is signed.
For any vendor, ask in writing where the files are stored, how long they are kept and whether they are used for training. The chronology software guide covers ABA Formal Opinion 512 and client consent in more detail.
What does a sensible first week look like?
A sensible first week runs date extraction on a closed file whose chronology your team already built, so every miss is easy to see.
- Day 1: pick one closed file of about 500 pages with handwritten notes, bills and at least one hospital stay.
- Day 2: run it through one or two readers and produce the date list with page citations.
- Day 3: compare it with your paralegal’s chronology, date by date, and count the misses and the wrong labels.
- Day 4: tune the labelling rules and the seven checks for the misses you found.
- Day 5: run the next new records packet in shadow mode while your team works as usual.
If the reader cannot match your team on its own closed file, it is not ready for a live case.
If it can, the eight hours a packet in the table above go back to the work only a paralegal can do, and the right date is on every row before the demand is drafted.
Let the software find the dates, keep the judgment with your paralegal, and see how much calmer the next records packet feels.
Sources and further reading
- NUCC: 1500 Claim Form Reference Instruction Manual, version 13.0 (July 2025)
- CMS: Medicare Claims Processing Manual, chapter 25, completing the UB-04 (CMS-1450)
- 45 CFR 164.514: de-identification of protected health information
- Amazon Textract: Queries
- Amazon Textract: pricing
- Amazon Comprehend Medical: detect entities (version 2), TIME_EXPRESSION
- Microsoft: Text Analytics for health entity categories (DATE, TIME)
- Anthropic: Claude PDF support
- Anthropic: Claude API pricing
- AWS: HIPAA eligible services reference
- BLS: paralegals and legal assistants, median pay
- ChartRequest: seven record dates law firms should track (October 29, 2026)
- CaseAgent: how to write a medical chronology (vendor guide)
Questions and answers
Can I use AI to extract dates from a medical records PDF?
Yes. A vision AI model or OCR plus a medical text service can list every date in a medical records PDF, label it as date of service, injury, admission, signature or fax date, and convert it to YYYY-MM-DD with a page citation. A paralegal should still review handwritten pages, day-first dates and anything flagged.
Which date should a medical chronology use?
A medical chronology should use the date of service, the day the patient was actually seen, not the date the note was dictated, signed, printed or faxed. Dictation and signature dates can run days behind the visit and invent treatment gaps that never happened.
Where is the date of service on a medical bill?
On a CMS-1500 physician bill, the dates of service are in box 24A, one line per service, in MM DD YY format with from and to dates. On a UB-04 hospital bill, form locator 6 shows the statement period, form locator 12 the admission date and form locator 45 the line service dates.
Can OCR read handwritten dates in medical records?
Partly. Typed dates read reliably, but handwritten chiropractic and therapy notes are where a 1 becomes a 7. Use a confidence threshold so low-confidence dates go to a person, and check every date against the dates around it on the same page.
Are dates in medical records protected health information?
Yes. The HIPAA de-identification rule, 45 CFR 164.514, lists all elements of dates except the year, such as birth, admission, discharge and death dates, as identifiers. Treat an extracted date list with the same care as the medical records it came from.