Here is my script
Code: Select all
F1::
Inputdata = %Clipboard%
Clipboard=
Stringreplace, inputdata, inputdata, ID# (primary insurance), Capture_Pri_ID=, all
Stringreplace, inputdata, inputdata, ID# (secondary Insurance), Capture_Sec_ID=, all
Stringreplace, inputdata, inputdata, Is there a secondary insurance?, Sec_Flag=,all
DataInput := StrReplace(inputdata, "`r`n", "`n")
Loop, parse, DataInput, `n, `r
{
Input := A_LoopField
RegExMatch(input, "i)Patient Name ([^\n]+)", Get_Name)
RegExMatch(input, "i)Address ([^\+]+)", Get_Add)
RegExMatch(input, "i)DOB ([^\n]+)", Get_DOB)
RegExMatch(input, "i)Gender ([^\n]+)", Get_Gender)
RegExMatch(input, "i)Phone ([^\n]+)", Get_Phone)
RegExMatch(input, "i)Primary Insurance ([^\n]+)", Get_Pri_Sub)
RegExMatch(input, "i)Capture_Pri_ID=([^\n]+)", Get_Pri_ID)
RegExMatch(input, "i)Primary Name ([^\n]+)", Get_Pri_Sub_Name)
RegExMatch(input, "i)Primary DOB ([^\n]+)", Get_Pri_Sub_DOB)
RegExMatch(input, "i)Pt. Relationship to Primary Member ([^\n]+)", Get_Rel_Pri)
RegExMatch(input, "i)Sec_Flag=([^\n]+)", Get_Sec_Flag)
RegExMatch(input, "i)Secondary Insurance ([^\n]+)", Get_Sec_Name)
RegExMatch(input, "i)Capture_Sec_ID=([^\n]+)", Get_Sec_ID)
RegExMatch(input, "i)Secondary Name ([^\n]+)", Get_Sec_Sub_Name)
RegExMatch(input, "i)Secondary DOB ([^\n]+)", Get_Sec_Sub_DOB)
RegExMatch(input, "i)Pt. Relationship to Secondary Member ([^\n]+)", Get_Rel_Sec)
RegExMatch(input, "i)Date of Service ([^\n]+)", Get_DOS)
RegExMatch(input, "i)Doctor ([^\n]+)", Get_DrName)
RegExMatch(input, "i)Total Patient Paid ([^\n]+)", Get_Copay)
RegExMatch(input, "i)Notes ([^\+]+)", Get_Notes)
RegExMatch(input, "i)Re-submission Comments ([^\n]+)", Get_Resub)
Get_Name1 = %Get_Name1%
Get_Add1 = %Get_Add1%
Get_DOB1 = %Get_DOB1%
Get_Gender1 = %Get_Gender1%
Get_Phone1 = %Get_Phone1%
Get_Pri_Sub1 = %Get_Pri_Sub1%
Get_Pri_ID1 = %Get_Pri_ID1%
Get_Pri_Sub_Name1 = %Get_Pri_Sub_Name1%
Get_Pri_Sub_DOB1 = %Get_Pri_Sub_DOB1%
Get_Rel_Pri1 = %Get_Rel_Pri1%
Get_Sec_Flag1 = %Get_Sec_Flag1%
Get_Sec_Name1 = %Get_Sec_Name1%
Get_Sec_ID1 = %Get_Sec_ID1%
Get_Sec_Sub_Name1 = %Get_Sec_Sub_Name1%
Get_Sec_Sub_DOB1 = %Get_Sec_Sub_DOB1%
Get_Rel_Sec1 = %Get_Rel_Sec1%
Get_DOS1 = %Get_DOS1%
Get_DrName1 = %Get_DrName1%
Get_Copay1 = %Get_Copay1%
Get_Notes1 = %Get_Notes1%
Get_Resub1 = %Get_Resub1%
Stringreplace, Get_Notes1, Get_Notes1, `n, #xxzz, All
Stringreplace, Get_Notes1, Get_Notes1, `r, #xxzz, All
Stringreplace, New_Note, Get_Notes1, #xxzzProcedures#xxzz, `n, All
Stringsplit, Full_Note, New_Note, `n
Stringreplace, Full_Note1, Full_Note1, #xxzz, %A_Space%, All
StringReplace, Get_Phone1, Get_Phone1, )%A_Space%, )-, All
Stringsplit, Pt_Add, Get_Add1, `n
Pt_Add1 = %Pt_Add1%
Pt_Add2 = %Pt_Add2%
Stringsplit, Pt_City, Pt_Add2, `,
Pt_City1 = %Pt_City1%
Pt_City2 = %Pt_City2%
Stringsplit, St_Zip, Pt_City2, %A_Space%
Stringsplit, Pt_Name, Get_Name1, %A_Space%
Stringsplit, Pri_Sub_Name, Get_Pri_Sub_Name1, %A_Space%
Stringsplit, Sec_Sub_Name, Get_Sec_Sub_Name1, %A_Space%
Sec_Sub_Lname = %Sec_Sub_Name2% %Sec_Sub_Name3%
Sec_Sub_Lname = %Sec_Sub_Lname%
Pri_Sub_Lname = %Pri_Sub_Name2% %Pri_Sub_Name3%
Pri_Sub_Lname = %Pri_Sub_Lname%
Last_Name = %Pt_Name2% %Pt_Name3%
Last_Name = %Last_Name%
Full_Name = %Last_Name%, %Pt_Name1%
Pri_Sub_Full_Name = %Pri_Sub_Lname%, %Pri_Sub_Name1%
Sec_Sub_Full_Name = %Sec_Sub_Lname%, %Sec_Sub_Name1%
if Full_Name = `,
Full_Name =
if Sec_Sub_Full_Name = `,
Sec_Sub_Full_Name=
if Pri_Sub_Full_Name = `,
Pri_Sub_Full_Name =
St_Zip1 = %St_Zip1%
St_Zip2 = %St_Zip2%
FileAppend, %Full_Name%`t%Pt_Add1%`t%Pt_City1%`t%St_Zip1%`t%St_Zip2%`t%Get_DOB1%`t%Get_Gender1%`t%Get_Phone1%`t%Get_Pri_Sub1%`t%Get_Pri_ID1%`t%Pri_Sub_Full_Name%`t%Get_Pri_Sub_DOB1%`t%Get_Rel_Pri1%`t%Get_Sec_Flag1%`t%Get_Sec_Name1%`t%Get_Sec_ID1%`t%Sec_Sub_Full_Name%`t%Get_Sec_Sub_DOB1%`t%Get_Rel_Sec1%`t%Get_DOS1%`t%Get_DrName1%`t%Get_Copay1%`t%Full_Note1%`t%Get_Resub1%`n, W:\Ded Hold 2018\Data_Text.txt
Pt_Add1=
Pt_City1=
St_Zip1=
St_Zip2=
Get_DOB1=
Get_Gender1=
Get_Phone1=
Get_Pri_Sub1=
Get_Pri_ID1=
Pri_Sub_Full_Name=
Get_Pri_Sub_DOB1=
Get_Rel_Pri1=
Get_Sec_Flag1=
Get_Sec_Name1=
Get_Sec_ID1=
Sec_Sub_Full_Name=
Get_Sec_Sub_DOB1=
Get_Rel_Sec1=
Get_DOS1=
Get_DrName1=
Get_Copay1=
Full_Note1=
Get_Resub1=
Sec_Sub_Lname=
Pri_Sub_Lname=
Last_Name=
Pri_Sub_Full_Name=
Full_Name=
Sec_Sub_Full_Name=
Pt_Name=
Pt_Add1=
Pt_Add2=
inputdata=
}
Msgbox, Task has been completed
return
Code: Select all
Form Name: The ABXZ Group
Submission Time: February 6, 2001 10:10 am
Browser: Chrome 63.0.3239.111 / Windows 8.1
IP Address: XX.XX.XX..XXX.
Unique ID: 00099988
Location: 40121445, Unknown
Date of Service 01/02/1901
Choose One Other: do not bill Customer.
Patient Name DOE JOHNONE
Doctor XXXX, ZZZZ
Address 111 NONE AVE
NONE, NY 12345
Phone (000) 999-9999
DOB 01/01/1801
Gender M
Pt. Relationship to Primary Member Spouse
Primary Name DOE SPOUSE
Primary DOB 01/01/1802
Primary Insurance NEW INSURANCE
ID# (primary insurance) XXX1212454545
Is there a secondary insurance? No
Procedures
Special Services Fundus Photography ST11111
VF-Intermediate RT32232
External Photography VT21454
Choose to open lists Retina
Other (enter code)
Retina Vitreous Strands H43.31__
Vitreous Strands H43.313
Retina DX connected to Procedure: ST11111
Other Other1
Other2
Other1 H53.143
Other2 H11.153
Other1 DX connected to Procedure: RT32232
Other2 DX connected to Procedure: VT21454
Total Patient Paid 0.00
Form Name: The ABXZ Group
Submission Time: February 6, 2001 10:10 am
Browser: Chrome 63.0.3239.111 / Windows 8.1
IP Address: XX.XX.XX..XXX.
Unique ID: 00099988
Location: 40121445, Unknown
Date of Service 01/02/1902
Choose One EE
Patient Name DOE JOHNTWO
Doctor YYYY, XXXXX
Address 1 NONE ST
NONE, NY 12345
Phone (888) 888-8888
DOB 01/17/1861
Gender M
Pt. Relationship to Primary Member Spouse
Primary Name DOE SPOUSE-TWO
Primary DOB 01/02/1856
Primary Insurance OTHER INSURANCE
ID# (primary insurance) 115455X4540
Is there a secondary insurance? No
Procedures
Eye Exams EP Intermediate VT92014
Refraction ST92015
92014 amt pd 10.00
92015 amt pd 0.00
Special Services Fundus Photography VT92250
VF-Extended ST92083
92250 amt pd 0.00
92083 amt pd 0.00
ICD-10 CM
Choose to open lists Visual Disorders
Other (enter code)
Visual Disorders Presbyopia H52.4
Presbyopia H52.4
Visual Disorders DX connected to
Procedure:
VT92014, ST92015
Other Other1
Other1 H35.033
Other1 DX connected to Procedure: VT92250, ST92083
Total Patient Paid 10.00