You are here: Home Information for OSCAR Users EMR Resources QBE search for patients based on the diagnostic code used at billing
Personal tools
Document Actions

search for patients based on the diagnostic code used at billing

by David Chan last modified 2007-11-14 14:10

I am wanting to write a query that can search for patients based on the diagnostic code used at billing (eg those patients with a diagnostic code of 250). The Query I have looks at the disease registry for those patients. David Page

select last_name,first_name  from  billingmaster, demographic where  billingmaster.demographic_no = demographic.demographic_no and  dx_code1 in ('250');

You can replace 250 with any code you want.  If you want to search more
than one at a time just add a comma between the codes  eg  ('250','401');

Jay Gallagher

 

 

Here is one that we used quite a bit, where you can enter the provider
number, the diagnostic and a date of service.  I think that most clinics
need to search by provider to catch the 14050 service codes!!   Reminder
- save it as a favourite and ID it so that you can access it again easily
Patti

select b.provider_no, b.billing_date, b.demographic_name,bm.dx_code1
from billing b, billingmaster bm where b.provider_no = '301' and
b.billing_no = bm.billing_no and bm.dx_code1 = '250' and b.billing_date
 > '2005-09-09' order by b.demographic_name

The above will give you the provider, date, name of the patient....for
all patients belonging to provider number 301 and who have had the dx
code 250 used since September 2005.