I have a provider who needs a report that would show the age of all patients she has seen since we implemented GE. The only way I can think to do this would be to search for all signed documents by that provider and then take all of those patients and create my own excel document with the patients name and age. It will obviously be time consuming. Can anyone help me out with an easier way to get the results I need?
I have done this with Crystal Reports.Actually, the report includes lots more info - that you might find useful, or simply delete the columns.
Do you have Crystal Reports?
If you don't have crystal
patients>responsible provider and run that. Export the data only to excel
remove the 1st row: "results"
run this script
https://support.microsoft.com/en-us/kb/213610
We don't have crystal reports. I did think to run the inquiry you mentioned. Our responsible provider field is set to the most recent provider the patient saw. So it will not give me an accurate report on all patients she has seen. Because the patient may have seen one of our other providers since they last saw her.
I would start with the following script in SQL, you can also add the Document and DocTypes tables if you want to select only specific Visit Types (8766 = 365.25 *24). 'xxxxx' would be your provider's login id.
selectdistinctDATEDIFF(hour,pp.Birthdate,GETDATE())/8766 Age, pp.PatientId, pp.searchname
from PatientVisit pv, DoctorFacility df, PatientProfile pp
where pv.DoctorId = df.DoctorFacilityId
and df.LoginUser ='xxxxx'
and pv.PatientProfileId = pp.PatientProfileId