Extracting a text value from the contents of a PDF

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I've searched but don't seem to be asking the question properly. I am able to extract the date from a file and I can search a file for a particular word and rename the file with that word. This seems different, though.

I will be getting dozens of Explanation of Benefits and After Visit Summaries over the next year due to a family medical situation. The After Visit Summaries all have text that shows something like:

Today's Visit
You saw CARRIE PETERSON MD on Monday, April 5, 2021.

The doctor or department name is always in all caps but it will change depending on who we saw that day. Is there a way for me to grab that text using Hazel so I could end up with a file name like:

2021-04-05 AVS CARRIE PETERSON MD

(I know how to do the date work. I don't want to create a rule for each of the dozens of providers, labs, docs, departments, we'll be seeing.)

Thanks for any tips!
waxwing
 
Posts: 6
Joined: Wed Feb 02, 2011 10:20 am

Use a match pattern with a custom text attribute, instead of a date. The pattern could be something like:
Code: Select all
You saw (• doctor name) on (◦ visit date)

where (• doctor name) is a custom text attribute set to match "anything".
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support