Capture Data from Pdf File

#43/2, New Airport Road, NH.7, Sahakara
Hebbal, Bangalore, Karnataka 560092, India
Tel: 080-43420100, www.asterbangalore.com

Final Bill No ( ABH01ICR22012559 ) Breakup
Page 1 of 5

To: XYZ Company
Aster ID: ABHxxxxxxxx
Patient Name: Mr. CHANDRAKUMAR R
Age(Gender): 58Y 0M 29D (M)
Contact: (91) 944******
Doctor: Dr.MADHUSUDAN G
Deparment: PLASTIC AND COSMETIC SURGERY
Network: GENERAL NETWORK
Bill No: ABH01ICR22012***
Bill Date: 20-07-2022
Patient No: AI220215***
Bed No: TRS -07
Pay Type: CREDIT
Bill Type: NORMAL
Admitted on: 11/07/2022 12:59
Discharged on: 18/07/2022 16:58

34 18/07/22 17:39 VACUUM ASSISTED CLOSURE 500ML-CANISTER WITH GEL FOR 2.00 3,325.00 6,650.00
GRANUFOAM KCI( Exp. :07-2024) (MFR:KCI )
35 18/07/22 14:17 NORMAL SALINE 0.9 PERCENT 100 ML ( STERIPOT-AMANTA ) INFUSION( 1.00 42.01 42.01
Exp. :03-2025) (MFR:AMANTA HEALTHCARE )
36 18/07/22 17:39 GRANULOFOAM DRESSING-MEDIUM-M8275052 KCI( Exp. :09-2024) 2.00 9,980.00 19,960.00
(MFR:KCI )
NET AMOUNT(Rs.) : 149,388.20

Gross Amount(Rs.): 193,981.95

Insurance Approval(Rs.): 0.00

Copay/Patient Collection(Rs.): 0.00

Discount(Rs):(+) 8,708.00

Total Amount(Rs.): 185,273.95

Round Amount(Rs.): 0.05

Net Amount(Rs): 185,274.00

Net Payable In Words: (Rs)One Lakh Eighty-Five Thousand Two Hundred Seventy-Four only

Note: All the Amounts are Shown in Rs GSTIN: 29AACCD7912K1ZD.

Printed By: 181602 Printed On: 02/02/2023 11:39:26
Bill Generated By: BHASKARA N Bill Authorized By: 501213

Kindly Help to capture the 1) Patient Name 2) Doctor Name 3)Admitted Date and the 4)Gross Amount form this text file

Hi @varshini_bali,

Can you share your PDF, I will write a code to extract it from there.

or the Above data, you are getting after extracting the Text from PDF?

Regards,
Firoz

@varshini_bali

Please try this

PName = System.Text.Regularexpressions.Regex.Match(str,"(?<=Patient Name:).*").Value.Trim

DName = System.Text.Regularexpressions.Regex.Match(str,"(?<=Doctor:).*").Value.Trim

Admitted= System.Text.Regularexpressions.Regex.Match(str,"(?<=Admitted On:).*").Value.Trim

Amount = System.Text.Regularexpressions.Regex.Match(str,"(?<=Gross Amount\(Rs\.):\).*").Value.Trim

Hope this helps.All the outputs are in string format

Cheers

Hi @FIROZ_RANGREZ ,
The above data is of after extracting the data from pdf itself
Regards,
Varshini