iOS shortcut to extract patient information from sticker

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):

UR: 123456
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
HF/CT INSURCO 57015112

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:

Thanks for any pointers.

Use the Get Item from List action using the index option to select the lines required from the Split Lines action.

I’m at work at the moment so can’t fill out the Shortcut at the minute, but if I’ll try and add more detail later if this hasn’t helped enough.