Creating a report to find patients with a particular diagnosis

advertisement
Primary and Secondary Diagnosis Report
Report Overview
This report displays a list of active patients with a specific primary and secondary diagnosis.
Report Setup



After logging into Dawn AC, choose F5 on your keyboard to bring up the menu on the left
From the menu, choose Management – Reports – Parameter
Click on the New button at the bottom of the screen, enter the details as below and click on the Save
button
Page 1 of 3
05/02/2016
Primary and Secondary Diagnosis Report

Again, click on the New button at the bottom of the screen, enter the details as below and click on the
Save button


From the menu, choose Management – Reports – Report
At the top of the screen, a list of your existing reports should appear. Choose the New button at the
bottom of the screen to create a new report
Give the report a name like ‘Primary and Secondary Diagnosis Report’ and a description
In the Query tab, paste in the following text:


SELECT [Primary].cDescription AS [Primary Diagnosis], Patient.cFirstName + ' ' + Patient.cLastName AS Name,
Patient.cUnitNo AS UnitNo, Patient.dDOB AS DOB, [Secondary].cDescription AS [Secondary Diagnosis], 1 as
count
FROM
(Diagnosis [Secondary] RIGHT JOIN
(PatientDiagnosis SecondaryDiagnosis RIGHT JOIN
(Diagnosis [Primary] RIGHT JOIN
(PatientDiagnosis PrimaryDiagnosis RIGHT JOIN
(TreatmentPlan RIGHT JOIN
Patient
ON TreatmentPlan.pkiTreatmentPlanID = Patient.fkiCurrentTreatmentPlanID)
ON PrimaryDiagnosis.fkiPatientID = Patient.pkiPatientID AND PrimaryDiagnosis.pkiPatientDiagnosisID =
TreatmentPlan.fkiPrimaryDiagnosisID)
ON [Primary].pkiDiagnosisID = PrimaryDiagnosis.fkiDiagnosisID)
ON SecondaryDiagnosis.fkiPatientID = Patient.pkiPatientID AND SecondaryDiagnosis.pkiPatientDiagnosisID
<> TreatmentPlan.fkiPrimaryDiagnosisID)
ON [Secondary].pkiDiagnosisID = SecondaryDiagnosis.fkiDiagnosisID)
WHERE #[Primary Diagnosis: [Primary].pkiDiagnosisID,=]#
AND #[Secondary Diagnosis: [Secondary].pkiDiagnosisID,=]#
AND TreatmentPlan.cStatus='Active'
ORDER BY [Primary].cDescription, Patient.cLastName,Patient.cFirstName
Page 2 of 3
05/02/2016
Primary and Secondary Diagnosis Report


Choose the Save button at the bottom of the screen to save the report
Choose the Parameters tab, and click on the ‘form’ icon at the top left hand side of this screen



From the scroll down list that appears, double-click on the ‘Primary Diagnosis’ parameter
Again, click on the ‘form’ icon at the top left hand side of this screen
From the scroll down list that appears, double-click on the ‘Secondary Diagnosis’ parameter



Click on the Query tab, and click on the Synchronise button at the bottom of the screen (underneath the
columns section)
Click on any one of the rows in the columns box
Ensure the Display in List, Group and Sum values are set as follows:


Choose the Save button at the bottom of the screen and close the window
Run the report as normal
Page 3 of 3
05/02/2016
Download