I need to get the list of the patient with the active problems. Which tables do I use for this report?
Hi,
We are on CPS. I'm not sure if there are any structural differences between CPS and EMR in the database. So your millage may vary on the following. However, having said that, these should work for most reports dealing with problems:
PatientProfile - has patient demographic data
Problem - has all of the patient problems
MasterDiagnosis - ICD10 codes and descriptions among other things
If you go on the GE portal you can also download the CPS data dictionaries that will let you browse the database tables and read descriptions of their purpose.
Brad
In CEMR PatientProfile is called PERSON.
SELECT P.PatientId, P.First, P.Last, DX.CODE AS [ICD-9], DX.DESCRIPTION AS DX
FROM PROBLEM DX
INNER JOIN PatientProfile P ON DX.PID = P.PId
WHERE P.PatientID = 'ENTER ID HERE'
AND CHANGE IN (2, 6)
AND STOPDATE > GETDATE()