Formatting code for ActivePatientsWithoutDiagnosis
======Active Patients Without a Diagnosis======
Back to [[QueryDirectory Query Directory]]
//
I am interested in running a report based on the active patients who currently lack a Diagnosis code on their records. I currently have a flag prior to billing claims, but I want an actual print up of the patients who lack a dx.
//
%%(sql)
SELECT
a.lastname, a.firstname, a.id
FROM
patients a
LEFT OUTER JOIN ptcsudx b ON a.ptcsunum = b.ptcsunum
WHERE
a.flag = 0
AND a.dischargedate IS NULL
AND b.dxcode1 IS NULL
ORDER BY a.lastname, a.firstname, a.id
%%
----
CategoryQueries
Back to [[QueryDirectory Query Directory]]
//
I am interested in running a report based on the active patients who currently lack a Diagnosis code on their records. I currently have a flag prior to billing claims, but I want an actual print up of the patients who lack a dx.
//
%%(sql)
SELECT
a.lastname, a.firstname, a.id
FROM
patients a
LEFT OUTER JOIN ptcsudx b ON a.ptcsunum = b.ptcsunum
WHERE
a.flag = 0
AND a.dischargedate IS NULL
AND b.dxcode1 IS NULL
ORDER BY a.lastname, a.firstname, a.id
%%
----
CategoryQueries