Trying to run a report showing all patients and their info under a certain employer. Using Query Example 131 which has: /*131 Patients with insurance of specific employers, uses insurance employer(s) you should repeat the employer name if you only want one, many times employers are listed more than one way, like HP and Hewlett Packard*/
SELECT EmpName AS 'Employer', PatNum, p.address, p.address2,p.city,p.state,p.zip
FROM patient p
For some reason OD is not recognizing EmpName. The error message is "Invalid query: Unkwon column 'EmpName' in 'field list'
Any reason this is happening. I am designating an employer in that area that is exact with what's in OD.
Patients under an Employer
Re: Patients under an Employer
That query is outdate. The employer feature got updated and is part of a different table and is now referenced as EmployerNum, hence the "unknown column" error. I'll have it updated soon.
The best thing about a boolean is even if you are wrong, you are only off by a bit.
Jason Salmon
Open Dental Software
http://www.opendental.com
Jason Salmon
Open Dental Software
http://www.opendental.com
Re: Patients under an Employer
Actually, after looking closer at the query, it is updated correctly. What version of Open Dental are you using? I recommend updating to our most recent stable version.
Or are you just running part of the query (the section you pasted above)? Because to have the query be successful, you need to run the entire thing.
Or are you just running part of the query (the section you pasted above)? Because to have the query be successful, you need to run the entire thing.
Code: Select all
SELECT EmpName AS 'Employer', PatNum, p.address, p.address2,p.city,p.state,p.zip
FROM patient p
INNER JOIN inssub iss ON iss.Subscriber=p.PatNum
INNER JOIN insplan i ON i.PlanNum=iss.PlanNum
INNER JOIN employer e ON i.EmployerNum=e.EmployerNum
WHERE p.PatStatus=0 AND
((empname LIKE ('%IBM%')) OR (empname LIKE ('%Frijole Taco Stand%')))
ORDER BY EmpName, p.lname;
The best thing about a boolean is even if you are wrong, you are only off by a bit.
Jason Salmon
Open Dental Software
http://www.opendental.com
Jason Salmon
Open Dental Software
http://www.opendental.com
-
- Posts: 12
- Joined: Tue May 07, 2013 12:57 pm
Re: Patients under an Employer
Nevermind, Stupid mistake!