We are currently updating the OP Help Center content for the release of OP 14.19 or OP 19. OP 19 is a member of the certified OP 14 family of products (official version is 14.19.1), which you may see in your software (such as in Help > About) and in the Help Center tabs labeled 14.19. You may also notice that the version number in content and videos may not match the version of your software, and some procedural content may not match the workflow in your software. We appreciate your patience and understanding as we make these enhancements.

SQL: Vaccine Payments by VFC Status

About

This report shows the vaccines given in the office between two dates you specify. It also shows the VFC status, payments, and adjustments for each vaccine.

A sample image of this SQL report run in the Database Viewer is shown below:

Caveats

This includes vaccine serum data, but it does not include vaccine administration codes.

Code

To highlight and copy the code below to your clipboard, simply click the Copy button.

select date1, patno, staffname as rendering_provider, fname, lname, vfc1, vacname, cptcode, charge, ins_carrier_code, ins_carrier_code_other, round(p,2) as ins_paid, round(c,2) as patient_pd, round(a,2) as total_adjustment from vaccine1
inner join register on register.patno =vaccine1.patno
left outer join (Select trnsxno, date1, charge, rend_addr_id, ins_Carrier_code, ins_carrier_code_other, cptcode, patno from archive_transactions where cptcode between '90600' and '90745' and archive_Flag = 1) at1 on at1.patno = vaccine1.patno and at1.date1 = vaccine1.vacdate and at1.cptcode = vaccine1.offcode
left outer join (select sum(payment) as p, sum(copayrecd) as c, sum(adjustment + copayadjustment) as a, txnopaid from archive_transactions group by txnopaid) at2 on at2.txnopaid = at1.trnsxno
left outer join staff1 on staff1.staffid = at1.rend_addr_id
where vacdate between :Start_date and :end_Date and vfc1 <> 9