checking in more stuff and even more stuff. .. :)
This commit is contained in:
@@ -91,7 +91,7 @@ INNER JOIN MWPRO MWPRO ON
|
||||
INNER JOIN MWCLA MWCLA ON
|
||||
(MWCLA."Claim Number" = MWTRN."Claim Number")
|
||||
WHERE (MWTRN."Transaction Type" BETWEEN 'A' AND 'H') AND
|
||||
(MWTRN."Date From" between '01/1/2015' and '12/31/2016') AND (MWCLA."Claim Status 1" in ('2', '3', '4', '6'))) A
|
||||
(MWTRN."Date From" >= '01/1/2015') AND (MWCLA."Claim Status 1" in ('2', '3', '4', '6'))) A
|
||||
|
||||
//Primary Payments (MWPRI)
|
||||
LEFT OUTER JOIN
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
178
QuickFTP/quickftp/bin/Release/query1.txt
Normal file
178
QuickFTP/quickftp/bin/Release/query1.txt
Normal file
@@ -0,0 +1,178 @@
|
||||
Select
|
||||
A."Entry Number",
|
||||
A.Chart_Number,
|
||||
A."First Name" as First_Name,
|
||||
A."Last Name" as Last_Name,
|
||||
A.Claim_Number,
|
||||
A.Date_From,
|
||||
A.Description as Level_Of_Care,
|
||||
A.Amount,
|
||||
B.Payment_Status,
|
||||
A.Diagnosis1,
|
||||
A.Diagnosis_Description,
|
||||
D.DED,
|
||||
I.ERA_DED,
|
||||
A.Insurance_Name,
|
||||
A.Insurance_Class,
|
||||
A."Insurance_1_Amount_Paid",
|
||||
A."Insurance_2_Amount_Paid",
|
||||
A.Adjustment_Amount,
|
||||
A.Referring_Provider,
|
||||
A.Policy_1,
|
||||
A.Group_Number_1,
|
||||
A.Initial_Billing_Date,
|
||||
A.Primary_Billing_Date,
|
||||
A.Referring_Provider,
|
||||
MWPRI."Date From" as Primary_Paid_Date,
|
||||
MWSEC."Date From" as Secondary_Paid_Date,
|
||||
MWGUA."Date From" as Guarantor_Paid_Date
|
||||
|
||||
|
||||
|
||||
from
|
||||
//Main Query
|
||||
(Select distinct MWTRN."Entry Number",
|
||||
MWTRN."Chart Number" as Chart_Number,
|
||||
MWPAT."First Name",
|
||||
MWPAT."Last Name",
|
||||
MWTRN."Claim Number" AS Claim_Number,
|
||||
MWTRN."Date From" AS Date_From,
|
||||
|
||||
|
||||
MWTRN."Diagnosis Code 1" as Diagnosis1,
|
||||
MWTRN."Diagnosis Code 2" as Diagnosis2,
|
||||
DIA."Description" as Diagnosis_Description ,
|
||||
DIA2."Description" Diagnosis2_Description,
|
||||
|
||||
MWINS."Insurance Class" as Insurance_Class,
|
||||
|
||||
MWTRN.Amount,
|
||||
//whatthehellisthis "Procedure Code" As Units,
|
||||
MWPRO.Description,
|
||||
"Adjustment Amount",
|
||||
MWPRO."Description",
|
||||
MWINS."Name" as Insurance_Name,
|
||||
MWTRN.Amount,
|
||||
MonthName("MWTRN"."Date Created") as MonthofYear,
|
||||
Year("MWTRN"."Date Created") as TheYear,
|
||||
MWTRN."Diagnosis_12_Description" as Blank,
|
||||
MWPRO."Description" As Level_Of_Care,
|
||||
MWINS."Insurance Class" as Insurance_Class,
|
||||
MWINS."Name" as Insurance_Name,
|
||||
MWCAS."Policy Number #1" as Policy_1,
|
||||
MWCAS."Group Number #1" as Group_Number_1,
|
||||
MWCLA."Initial Billing Date 1" as Initial_Billing_Date,
|
||||
MWCLA."Primary BIlling Date"as Primary_Billing_Date,
|
||||
MWTRN."Attending Provider" AS Attending_Provider,
|
||||
MWTRN."Insurance 1 Amount Paid" AS Insurance_1_Amount_Paid,
|
||||
MWTRN."Insurance 2 Amount Paid" AS Insurance_2_Amount_Paid,
|
||||
MWTRN."Insurance 3 Amount Paid" AS Insurance_3_Amount_Paid,
|
||||
MWTRN."Guarantor Amount Paid" AS Guarantor_Amount_Paid,
|
||||
MWTRN."Adjustment Amount" AS Adjustment_Amount,
|
||||
(MWRPH."First Name" + MWRPH."Last Name") AS Referring_Provider,
|
||||
MWRPH."Code" as Referring_Provider_Code
|
||||
|
||||
|
||||
FROM MWTRN
|
||||
INNER JOIN MWCAS MWCAS ON
|
||||
(MWCAS."Case Number" = MWTRN."Case Number")
|
||||
INNER JOIN MWINS MWINS ON
|
||||
(MWINS."Code" = MWCAS."Insurance Carrier #1")
|
||||
INNER JOIN MWDIA DIA ON
|
||||
MWTRN."Diagnosis Code 1" = DIA."Code 1"
|
||||
left outer JOIN MWDIA DIA2 ON
|
||||
MWTRN."Diagnosis Code 2" = DIA2."Code 1"
|
||||
INNER JOIN MWPAT MWPAT ON
|
||||
(MWPAT."Chart Number" = MWTRN."Chart Number")
|
||||
INNER JOIN MWPRO MWPRO ON
|
||||
(MWTRN."Procedure Code" = MWPRO."Code 1")
|
||||
left outer JOIN MWRPH ON
|
||||
MWCAS."Referring Provider" = MWRPH."Code"
|
||||
INNER JOIN MWCLA MWCLA ON
|
||||
(MWCLA."Claim Number" = MWTRN."Claim Number")
|
||||
WHERE (MWTRN."Transaction Type" BETWEEN 'A' AND 'H') AND
|
||||
(MWTRN."Date From" >= '01/1/2015') AND (MWCLA."Claim Status 1" in ('2', '3', '4', '6'))) A
|
||||
|
||||
//Primary Payments (MWPRI)
|
||||
LEFT OUTER JOIN
|
||||
(Select distinct MWTRN."Entry Number", MAX(MWTRN2."Date From") as "Date From"
|
||||
from MWTRN INNER JOIN MWPAX ON
|
||||
MWPAX."Charge Reference" = MWTRN."Entry Number"
|
||||
INNER JOIN MWTRN MWTRN2 ON
|
||||
MWPAX."Payment Reference" = MWTRN2."Entry Number"
|
||||
Where MWPAX."Who Paid" = '1' and MWPAX."Payment Amount" < 0
|
||||
and MWTRN2."Transaction Type" in ('I', 'M')
|
||||
group by MWTRN."Entry Number") MWPRI ON
|
||||
A."Entry Number" = MWPRI."Entry Number"
|
||||
|
||||
//Gather Secondary Payments (MWSEC)
|
||||
left outer JOIN
|
||||
(Select distinct MWTRN."Entry Number", MAX(MWTRN2."Date From") as "Date From"
|
||||
from MWTRN INNER JOIN MWPAX ON
|
||||
MWPAX."Charge Reference" = MWTRN."Entry Number"
|
||||
INNER JOIN MWTRN MWTRN2 ON
|
||||
MWPAX."Payment Reference" = MWTRN2."Entry Number"
|
||||
Where MWPAX."Who Paid" = '2' and MWTRN2."Transaction Type" in ('I', 'M')
|
||||
group by MWTRN."Entry Number") MWSEC ON
|
||||
A."Entry Number" = MWSEC."Entry Number"
|
||||
left outer JOIN
|
||||
|
||||
//Gather Guarantor Payments (MWGUA)
|
||||
(Select distinct MWTRN."Entry Number", MAX(MWTRN2."Date From") as "Date From"
|
||||
from MWTRN INNER JOIN MWPAX ON
|
||||
MWPAX."Charge Reference" = MWTRN."Entry Number"
|
||||
INNER JOIN MWTRN MWTRN2 ON
|
||||
MWPAX."Payment Reference" = MWTRN2."Entry Number"
|
||||
Where MWPAX."Who Paid" = 'G'
|
||||
group by MWTRN."Entry Number") MWGUA ON
|
||||
A."Entry Number" = MWGUA."Entry Number"
|
||||
|
||||
//Deductible Stuff (D)
|
||||
left outer join
|
||||
(Select abs(sum(cast(MWPAX."Payment Amount" as SQL_NUMERIC(9,2)))) as DED, MWTRN."Entry Number", MWTRN."Chart Number" from MWTRN INNER JOIN MWPAX on MWTRN."Entry Number" = MWPAX."Charge Reference"
|
||||
inner join MWTRN MWTRN2 on MWPAX."Payment Reference" = MWTRN2."Entry Number"
|
||||
Where MWTRN2."Transaction Type" = 'P'
|
||||
group by MWTRN."Chart Number", MWTRN."Entry Number") D
|
||||
on D."Entry Number" = A."Entry Number"
|
||||
|
||||
//I have no clue (I)
|
||||
left outer join (Select sum(cast((Substring(replace(MWTRN."Description", ',', ''), (LOCATE('$', MWTRN."Description") +1),
|
||||
((LOCATE(' ', MWTRN."Description") -1) - (LOCATE('$', MWTRN."Description") +1) ))) as SQL_Numeric(9,2))) as ERA_DED, mwtrn2."Entry Number", MWTRN2."Chart Number" from MWTRN
|
||||
INNER JOIN MWPAX on MWTRN."Entry Number" = MWPAX."Payment Reference"
|
||||
inner join MWTRN MWTRN2 on MWPAX."Charge Reference" = MWTRN2."Entry Number"
|
||||
Where MWTRN."Description" like 'ERA:Deductible=%' or MWTRN."Description" like 'ERA:PR1=%'
|
||||
group by MWTRN2."Chart Number", MWTRN2."Entry Number") I
|
||||
ON I."Entry Number" = A."Entry Number"
|
||||
|
||||
left outer join
|
||||
|
||||
(Select "Charge Reference" as CRef,
|
||||
(Case When MWDEP."Deposit Code" = 'A' Then 'ERA_Payment_Posting'
|
||||
When MWDEP."Deposit Code" = 'B' Then 'ERA_Payment_Confirmed'
|
||||
When MWDEP."Deposit Code" = 'F' Then 'Paid_Confirmed_Aging_To_Facility'
|
||||
When MWDEP."Deposit Code" = 'G' Then 'Paid_Per_Check_To_Facility'
|
||||
When MWDEP."Deposit Code" = 'J' Then 'Paid_Per_AR_To_Patient'
|
||||
When MWDEP."Deposit Code" = 'K' Then 'Paid_Per_Check_To_Patient'
|
||||
When MWDEP."Deposit Code" = 'N' Then 'Paid_Per_Aging_To_Facility'
|
||||
Else 'Unpaid' End) as Payment_Status,
|
||||
|
||||
sum(Case When MWDEP."Deposit Code" in ('A', 'B', 'E', 'F', 'G', 'J', 'K', 'N') Then (Cast(MWPAX."Payment Amount" as
|
||||
|
||||
SQL_NUMERIC(9,2))) Else 0 End) as Total_Deposit,
|
||||
Sum(Case WHen MWTRN."Transaction Type" = 'P' Then (Cast(MWPAX."Payment Amount" as SQL_NUMERIC(9,2))) Else 0 End) as D,
|
||||
Sum(Case WHen MWTRN."Transaction Type" in ('J', 'K', 'L') Then (Cast(MWPAX."Payment Amount" as SQL_NUMERIC(9,2))) Else 0
|
||||
|
||||
End) as C,
|
||||
Sum(Case WHen MWTRN."Transaction Type" in ('M', 'N', 'O') Then (Cast(MWPAX."Payment Amount" as SQL_NUMERIC(9,2))) Else 0
|
||||
|
||||
End) as P
|
||||
|
||||
|
||||
from MWPAX
|
||||
inner join MWDEP on
|
||||
MWDEP."Entry Number" = MWPAX."Deposit ID"
|
||||
inner join MWTRN on
|
||||
MWTRN."Entry Number" = MWPAX."Payment Reference" where MWTRN."Transaction Type" in ('I', 'J', 'K', 'N', 'O', 'P')
|
||||
Group By Cref, Payment_Status ) B
|
||||
ON A."Entry Number" = B.CREF
|
||||
// Group BY A.Chart_Number, A.Procedure_Code, A."First Name", A."Last Name", A.Insurance_Class, A.MonthofYear, A.TheYear,A.Blank,
|
||||
BIN
QuickFTP/quickftp/bin/Release/quickftp.exe
Normal file
BIN
QuickFTP/quickftp/bin/Release/quickftp.exe
Normal file
Binary file not shown.
21
QuickFTP/quickftp/bin/Release/quickftp.exe.config
Normal file
21
QuickFTP/quickftp/bin/Release/quickftp.exe.config
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="quickftp.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<quickftp.Properties.Settings>
|
||||
<setting name="AdvantagePath" serializeAs="String">
|
||||
<value>\\medisoft_server\medidata\EMBARK RECOVERY LLC\mwddf.add</value>
|
||||
</setting>
|
||||
<setting name="AdvantageUser" serializeAs="String">
|
||||
<value>user</value>
|
||||
</setting>
|
||||
<setting name="AdvantagePass" serializeAs="String">
|
||||
<value>password</value>
|
||||
</setting>
|
||||
</quickftp.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
BIN
QuickFTP/quickftp/bin/Release/quickftp.pdb
Normal file
BIN
QuickFTP/quickftp/bin/Release/quickftp.pdb
Normal file
Binary file not shown.
BIN
QuickFTP/quickftp/bin/Release/quickftp.vshost.exe
Normal file
BIN
QuickFTP/quickftp/bin/Release/quickftp.vshost.exe
Normal file
Binary file not shown.
21
QuickFTP/quickftp/bin/Release/quickftp.vshost.exe.config
Normal file
21
QuickFTP/quickftp/bin/Release/quickftp.vshost.exe.config
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="quickftp.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<quickftp.Properties.Settings>
|
||||
<setting name="AdvantagePath" serializeAs="String">
|
||||
<value>\\medisoft_server\medidata\EMBARK RECOVERY LLC\mwddf.add</value>
|
||||
</setting>
|
||||
<setting name="AdvantageUser" serializeAs="String">
|
||||
<value>user</value>
|
||||
</setting>
|
||||
<setting name="AdvantagePass" serializeAs="String">
|
||||
<value>password</value>
|
||||
</setting>
|
||||
</quickftp.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
11
QuickFTP/quickftp/bin/Release/quickftp.vshost.exe.manifest
Normal file
11
QuickFTP/quickftp/bin/Release/quickftp.vshost.exe.manifest
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
Reference in New Issue
Block a user