I do some work in a hospital for which I bill the insurance company. I was entering all patient details by hand into my spreadsheet to track things but thought that this might be a good opportunity to try my hand at automating this using shortcuts. However As this is my first attempt I am struggling a bit.
Each patient has a sticker that has the information I need to extract. So I am trying to extract the information from a photo of the sticker. So far I seem to be able to get the text from the sticker but have trouble processing it. I won’t put an actual sticker up, but here is a dummy of the text that I can extract so far (a bit of mess because of the formatting of the sticker and the OCR engine):
SMITH, MR JOHN
UR: 123456
123 MAIN STREET Adm:
234567
BIG CITY 2301
Adm Date: 26/05/22
PH: 55512345
DOB: 15/08/40 Age: 81 (M)
Medicare: 1234567890/1 03/26 Pen:
DR: Jones, Dr John Paul
1234567H
HF/CT INSURCO 57015112
Lingard0016780A
BIND
I want to extract the patient name (line 1), address (line 3 and 5), DOB (line 8), Medicare number (line 9, a 10 digit number and also a single digit code after), the insurance company and policy number (line 12).
I get as far as trying to get the name using a RegEx in a Match statement that works in regex101 but I can’t seem to get the information out or be able to move on to other data from there.
This is what I have so far:
https://www.icloud.com/shortcuts/73ef249326d34b439bd2926ac1844e69
Thanks for any pointers.