Important Content Update Message
We are currently updating the OP Help Center content for the release of OP 20. OP 20 (official version 20.0.x) is the certified, 2015 Edition, version of the Office Practicum software. This is displayed in your software (Help tab > About) and in the Help Center tab labeled Version 20.0. We appreciate your patience as we continue to update all of our content.

SQL: Unbilled Vaccines

About

This report shows vaccines that were administered but were not billed between the two dates that you specify.

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

Caveats

  • Vaccines without a matching CPT on the same date of service will flag as unbilled.  The appropriate CPT is determined by the assignment in Vaccine Setup.
  • Vaccines that are documented as given on a separate date than they were billed will appear as unbilled.
  • Depending on what data, and how you are obtaining it, from your IIS, this report may need to be modified so that it does not show historical vaccines.

Code

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

select distinct * from (
SELECT VACCINE1_1.PATNO, VACCINE1_1.VACNAME,
VACCINE1_1.VACDATE, VACCINE1_1.VFC1,
VACCINE1_1.ID, VACCINE1_1.ADMIN_ROUTE,
VACCINE1_1.CVXCODE, VACCINE1_1.OFFCODE,
ARCHIVE_TRANSACTIONS_1.CPTCODE,
ARCHIVE_TRANSACTIONS_1.DATE1,
VACCINE1_1.S_ADDR_ID, STAFF1_1.STAFFNAME
FROM VACCINE1 VACCINE1_1
LEFT OUTER JOIN (select patno, date1, cptcode from ARCHIVE_TRANSACTIONS where cptcode between '90620' and '90756') ARCHIVE_TRANSACTIONS_1 ON
(ARCHIVE_TRANSACTIONS_1.PATNO = VACCINE1_1.PATNO)
AND (ARCHIVE_TRANSACTIONS_1.DATE1 = VACCINE1_1.VACDATE)
INNER JOIN VACNAMES VACNAMES_1 ON
(VACNAMES_1.VACNYC = VACCINE1_1.CVXCODE)
INNER JOIN STAFF1 STAFF1_1 ON
(STAFF1_1.STAFFID = VACCINE1_1.S_ADDR_ID)
WHERE
( VACCINE1_1.VACDATE BETWEEN :start_date and :end_date )
AND ( VACCINE1_1.ADMIN_ROUTE IS NOT NULL ) and vfc1 <> 9
ORDER BY VACCINE1_1.PATNO, VACCINE1_1.VACDATE,
VACCINE1_1.VACNAME
) a
inner join register on register.patno = a.patno
where cptcode is null and lname <> 'TESTPATIENT'