I have a file being read line by line that contains short 3 letter labels i want to expand them to full words Im assuming it would be some form of the mid function to replace the letters but i dont quite know how to use it. Here is the code i have:
#1 is in this form
DOS:07-28-08
MAS:MARRIAMA
BPH:JOEL C. ANG, M.D.
CPH:
MIC:272.0
MDX:HIGH CHOLESTEROL
ONS:02-08-06
SIC:796.2
SDX:HIGH BLOOD PRESSURE
FUN:
NXA:2MO
NPH:JA
PLA:EKG
OAP:
COM:
I want it to read each line and where it has MAS replace it with Medical Assistant, MDX replace with primary diagnosis, and soforth.
How would i go about doing this?
Code:
Open "a:\vxdata.txt" For Input As #1
Open "C:\Test\Patient.htm" For Append As #2
Do While Not EOF(1)
Line Input #1, LineOfText
Print #2,
Print #2, LineOfText
Loop
Quote:
DOS:07-28-08
MAS:MARRIAMA
BPH:JOEL C. ANG, M.D.
CPH:
MIC:272.0
MDX:HIGH CHOLESTEROL
ONS:02-08-06
SIC:796.2
SDX:HIGH BLOOD PRESSURE
FUN:
NXA:2MO
NPH:JA
PLA:EKG
OAP:
COM:
How would i go about doing this?