Diagnoses and Problems: Two Sides of the Same Coin
Purpose: To explain the critical distinction between episodic diagnoses (what was treated during a visit) and longitudinal problems (a patient’s ongoing health issues), and to teach you how to query both correctly.
Two Views of Patient Conditions
Section titled “Two Views of Patient Conditions”Epic separates patient conditions into two fundamentally different but related concepts:
- Encounter Diagnoses: Conditions addressed during a specific visit. These are temporary and visit-specific.
- Problem List: A curated list of ongoing health issues, like diabetes or hypertension, that are tracked longitudinally across all encounters.
Understanding this distinction is crucial for accurate clinical analysis, quality reporting, and population health management.
Encounter Diagnoses: The PAT_ENC_DX
Table
Section titled “Encounter Diagnoses: The PAT_ENC_DX Table”Every encounter can have multiple diagnoses, organized using the familiar (ID, LINE)
pattern. These represent the clinician’s assessment for that specific visit.
Crucially, the LINE
number indicates entry order, NOT clinical priority.
The Primary Diagnosis Flag
Section titled “The Primary Diagnosis Flag”To identify the main reason for the visit, Epic uses an explicit flag, PRIMARY_DX_YN
.
Always use PRIMARY_DX_YN = 'Y'
to identify the primary diagnosis; never assume LINE = 1
.
The Problem List: A Longitudinal View
Section titled “The Problem List: A Longitudinal View”The PROBLEM_LIST
table tracks a patient’s ongoing health conditions over time. This list is actively managed by the care team.
Problems have three key statuses:
- Active: A current health issue.
- Resolved: The issue is no longer a concern.
- Deleted: The problem was entered in error.
Linking Encounter Diagnoses to the Problem List
Section titled “Linking Encounter Diagnoses to the Problem List”An encounter diagnosis can be linked to an existing problem or used to create a new one. The DX_LINK_PROB_ID
field in PAT_ENC_DX
creates this connection.
The Diagnosis Master: CLARITY_EDG
Section titled “The Diagnosis Master: CLARITY_EDG”Both systems link to the CLARITY_EDG
table, which contains the master list of all diagnosis codes and their descriptions.
Note that this EHI extract contains Epic’s internal diagnosis identifiers (DX_ID
), not standardized ICD codes.
Analyzing a Patient’s Complete Diagnostic History
Section titled “Analyzing a Patient’s Complete Diagnostic History”By combining these tables, you can create a comprehensive view of a patient’s health conditions.
Key Takeaways
Section titled “Key Takeaways”- Two Systems: Epic uses two systems to track conditions:
PAT_ENC_DX
for visit-specific diagnoses andPROBLEM_LIST
for ongoing issues. - Primary Diagnosis: Use
PRIMARY_DX_YN = 'Y'
to find the main diagnosis for a visit; do not rely onLINE = 1
. - Longitudinal View: The
PROBLEM_LIST
provides a patient’s long-term health summary. - Linking: The
DX_LINK_PROB_ID
field connects a visit diagnosis to an ongoing problem. - Master List:
CLARITY_EDG
is the dictionary for all diagnosis codes (DX_ID
). - No ICD Codes: This EHI export uses internal
DX_ID
s, not standardized ICD codes, for clinical diagnoses. ICD codes are found separately in billing data.