Having difficulty figuring this issue out.
I have two different queries built for Hospital Departments and time periods, one is called "PBS Worklist A-Z" and second one is "Chicago Worklist A-Z." Basically I have a patient who was admitted and seen in one specialty (SURG/ENT) and was then taken for surgery in another specialty (SURG/PEDI). The same patient account is in two different queries because of the criteria I put in the query which separates the worklist by specialty. I need to pull the lines of data for specific patient account from the "Chicago Worklist A-Z" query to the "PBS Worklist A-Z" query without changing my criteria for the field "Dept / Spec."
The reason being, I cant have all the data from "Chicago Worklist A-Z" query with specialty "SURG/PEDI" included in the "PBS" query just specific accounts that are demanded by my director. So is there a way to write something in the SQL statement to pull certain accounts from another criteria even though there is criteria mismatch in specialties?
Please see SQL statement below:
SELECT [HIM RAW DATA].Coder, [HIM RAW DATA].[Charge Status], [HIM RAW DATA].[RCA Edits], [HIM RAW DATA].[CM Edits], [HIM RAW DATA].[Research: Details], [HIM RAW DATA].[Charge ID], [HIM RAW DATA].[File ID], [HIM RAW DATA].FC, [HIM RAW DATA].[FC Groups], [HIM RAW DATA].[S ins], [HIM RAW DATA].[Payor Dtls], [HIM RAW DATA].[Pt Acct], [HIM RAW DATA].[MR No], [HIM RAW DATA].[Pt Last Name], [HIM RAW DATA].DOB, [HIM RAW DATA].Provider, [HIM RAW DATA].[Provider Name], [HIM RAW DATA].[Claim Info], [HIM RAW DATA].[Addl Description], [HIM RAW DATA].[Note Description], [HIM RAW DATA].Auth, [HIM RAW DATA].[PBS Flag], [HIM RAW DATA].[Dept / Spec], [HIM RAW DATA].Department, [HIM RAW DATA].[CM Mcal], [HIM RAW DATA].Inpt, [HIM RAW DATA].Started, [HIM RAW DATA].[Dif Add 1], [HIM RAW DATA].[Dif Add 2], [HIM RAW DATA].[RVU-RCA], [HIM RAW DATA].[CPT-RCA], [HIM RAW DATA].CPT, [HIM RAW DATA].[TM ID], [HIM RAW DATA].Units, [HIM RAW DATA].Mod1, [HIM RAW DATA].GP, [HIM RAW DATA].Mod2, [HIM RAW DATA].Mcal50, [HIM RAW DATA].Dx, [HIM RAW DATA].Dx2, [HIM RAW DATA].Dx3, [HIM RAW DATA].Dx4, [HIM RAW DATA].[CPT Description], [HIM RAW DATA].AssistNo, [HIM RAW DATA].AssistName, [HIM RAW DATA].AttendNo, [HIM RAW DATA].AttendName, [HIM RAW DATA].[CPT Type], [HIM RAW DATA].OLIED, [HIM RAW DATA].[OLIED DATE], [HIM RAW DATA].[DO NOT BILL], [HIM RAW DATA].CODED, [HIM RAW DATA].REDO, [HIM RAW DATA].[OLIE RPT ID]
FROM [HIM RAW DATA]
WHERE ((([HIM RAW DATA].[Dept / Spec]) In ("ANES","MED","OB/GYN","SURG/DENT","SURG/ENT","SURG/PODI")) AND (([HIM RAW DATA].Started)>#4/30/2012#) AND (([HIM RAW DATA].OLIED)=Off) AND (([HIM RAW DATA].[DO NOT BILL])=Off) AND (([HIM RAW DATA].CODED)=Off));