Good Afternoon,
Does anyone have the crystal report that will display in CPS the Authorized Provider on the tests orders?
Please contact me at [email protected]
Sent separately as an email but here is a SQL query that gets you orders information on Tests with Signing and Authorizing Providers:
select p.firstname, p.lastname, p.SOCSECNO, p.DATEOFBIRTH , p.medrecno, p.PATIENTID, o.description, o.code, o.orderdate, o.ordernum, o.status,
concat(u.lastname, ', ',u.firstname) as Authorizing,concat(u2.lastname, ', ',u2.firstname) as Signing
from person p
left outer join orders o on o.pid = p.pid
left outer join usrinfo u on u.pvid = o.AUTHBYUSRID
left outer join usrinfo u2 on u2.pvid = o.USRID
where o.ordertype = 'T'
and o.xid = 1000000000000000000
and o.change < 10