Demystifying INPATIENT_DATA_ID: When Outpatients Go "Inpatient"
Uncover one of Epic’s most misleading field names and learn how 95% of “inpatient” data IDs actually track outpatient visits.
The Name That Lies
Section titled “The Name That Lies”Picture this: You’re analyzing Epic data and discover that 40% of encounters have an INPATIENT_DATA_ID. “Wow,” you think, “this hospital has a massive inpatient population!” But wait - only 2% of those encounters have hospital admission records. What’s going on?
Welcome to one of Epic’s most confusing naming conventions, where INPATIENT_DATA_ID has almost nothing to do with actual inpatients.
Discovering the Truth About INPATIENT_DATA_ID
Section titled “Discovering the Truth About INPATIENT_DATA_ID”Let’s start by examining how many encounters actually have this mysteriously named field:
Nearly 40% of encounters have an INPATIENT_DATA_ID. But are they actually inpatient stays?
The Reality Check: Hospital Admissions vs INPATIENT_DATA_ID
Section titled “The Reality Check: Hospital Admissions vs INPATIENT_DATA_ID”The shocking truth: Only 4.55% of encounters with INPATIENT_DATA_ID are actual hospital admissions!
Where Are These “Inpatient” IDs Actually Used?
Section titled “Where Are These “Inpatient” IDs Actually Used?”Let’s see which departments are using INPATIENT_DATA_ID:
Surprise! The vast majority are outpatient departments:
- Internal Medicine clinics
- Laboratory services
- Pediatrics clinics
- Central scheduling
The ED Workflow Connection
Section titled “The ED Workflow Connection”One major use of INPATIENT_DATA_ID is to enable ED-style workflow tracking for non-emergency departments:
Internal Medicine clinics are using ED patient status workflows (Arrived → Rooming → Waiting → Visit in Progress) to track their patients!
Tracing INPATIENT_DATA_ID Across Tables
Section titled “Tracing INPATIENT_DATA_ID Across Tables”The INPATIENT_DATA_ID serves as a key linking encounters to enhanced tracking features:
The Master Store: IP_DATA_STORE
Section titled “The Master Store: IP_DATA_STORE”Every encounter with an INPATIENT_DATA_ID gets a record in IP_DATA_STORE:
The IP_DATA_STORE table serves as a central hub, linking the INPATIENT_DATA_ID back to the encounter CSN.
Finding the Real Hospital Admissions
Section titled “Finding the Real Hospital Admissions”When you need to identify actual inpatient stays, don’t rely on INPATIENT_DATA_ID:
True hospital admissions are identified by records in PAT_ENC_HSP, not by the presence of INPATIENT_DATA_ID.
Understanding the Misnomer
Section titled “Understanding the Misnomer”So what is INPATIENT_DATA_ID really? It’s an “enhanced encounter tracking identifier” used when departments need:
Best Practices for INPATIENT_DATA_ID
Section titled “Best Practices for INPATIENT_DATA_ID”1. Don’t Assume It Means Inpatient
-- WRONG: Counting inpatientsSELECT COUNT(*) as Inpatient_CountFROM PAT_ENCWHERE INPATIENT_DATA_ID IS NOT NULL;
-- RIGHT: Use PAT_ENC_HSPSELECT COUNT(*) as Inpatient_CountFROM PAT_ENC_HSP;
2. Use It for Enhanced Tracking Features
-- Find encounters with detailed workflow trackingSELECT pe.*, eds.ED_PAT_STATUS_C_NAMEFROM PAT_ENC peJOIN ED_PAT_STATUS eds ON pe.INPATIENT_DATA_ID = eds.INPATIENT_DATA_IDWHERE pe.INPATIENT_DATA_ID IS NOT NULL;
3. Join Through IP_DATA_STORE for Master Records
-- Link to the master inpatient data storeSELECT pe.*, ids.*FROM PAT_ENC peJOIN IP_DATA_STORE ids ON pe.INPATIENT_DATA_ID = ids.INPATIENT_DATA_ID;
Clinical Significance
Section titled “Clinical Significance”Understanding INPATIENT_DATA_ID’s true purpose helps you:
The distinction matters for:
- Accurate reporting: Don’t overcount inpatient utilization
- Workflow analysis: Understand which departments use enhanced tracking
- Data integration: Know which tables to join for complete information
- Performance: IP_DATA_STORE queries may be slower due to size
Summary
Section titled “Summary”INPATIENT_DATA_ID is one of Epic’s most misleading field names. Despite its name, 95% of encounters using it are outpatient visits that leverage inpatient-style tracking features. The field should be understood as an “enhanced encounter tracking ID” that enables:
- ED-style workflow tracking in any department
- Detailed flowsheet documentation
- Enhanced clinical tracking features
- Connection to the IP_DATA_STORE master record
When you need to identify true hospital admissions, always use PAT_ENC_HSP records, not INPATIENT_DATA_ID. This critical distinction ensures accurate analysis and prevents the common mistake of massively overcounting inpatient utilization.
Remember: In Epic’s world, “inpatient” doesn’t always mean inpatient - sometimes it just means “we want fancy tracking features for this outpatient visit!”