Hello ,
I want to fetch each piece of data from the text file below and create a JSON file, using keys with values. How can I do this? I have attached a small sample file.
Thanks in advance.
Sample file :
Tuesday, April 01, 2025
Patient First Name andy
Patient Middle Initial abc
Patient Last Name defcd
Date of Birth Friday, January 1, 1902
Sex Male
Phone Number (123) 456-7891
1Phone Type Work
Mailing Address
Preferred Language
1011 Ghijk ave
lamnop, qr, 98201
english
Race RTUV
Email ams@abc.org
Do you have a Guarantor? No
Emergency Contact Information
Emergency Contact test test
Emergency Contact Phone Number (000) 000-0000
Emergency Contact Phone Type Other
Emergency Contact’s Relationship to Patient
parent
Insurance Information
PRIMARY INSURANCE INFORMATION
Primary Insurance
test insurance
Primary Subscriber Name andy
Primary Subscriber’s Relationship to self
Patient (If you are the primary
subscriber, please write “self.”)
Primary Subscriber’s Date of Birth Friday, January 1, 1902
Primary Insurance ID # (include alpha asdasda321a
prefix, if applicable)
Primary Group # 123456
Do you have secondary insurance? No
SECONDARY INSURANCE INFORMATION
Patient Employer Information
Employer Name XYZABC
2Employer Phone Number (123) 456-7891
Employer City lamnop
Employer State qr
Reason for Visit
Please choose your marital status: Single
Do you currently or have you ever Yes
used tobacco products?
Please choose your tobacco smoking Former smoker
status:
Type of recreational drugs used: Other
If other, please list: test drug usage
Pharmacy Preference
What is your pharmacy of choice? Dummy
Location (City, State) lamnop, qr
Thnaks
Andy