encounter
One row per encounter, where an encounter is a single episode of care assembled from one or more claims. This is the table to use for counting visits, admissions and stays; it collapses the claim-line detail of medical_claim into clinically meaningful events and carries the classification (encounter_type, encounter_group), the timing, the responsible provider and facility, and rolled-up cost.
At a glance
| Schema | dax_core |
| Table | encounter |
| Layer | Core Data Model |
| Object type | table |
| Columns | 46 |
| Grain | encounter_id, data_source |
| Tags | core, encounters |
Columns
| Column | Type | Key | Terminology | Constraints | Description |
|---|---|---|---|---|---|
encounter_id | varchar | PK | — | not null | Dax identifier for the encounter. |
person_id | varchar | — | not null | The individual who received care. Joins to patient. | |
encounter_type | varchar | Encounter type | — | Fine-grained classification of the episode, for example acute inpatient or emergency department. | |
encounter_group | varchar | — | — | Coarser grouping of encounter_type, for high-level rollups. | |
encounter_start_date | date | — | — | First date of service in the episode. | |
encounter_end_date | date | — | — | Last date of service in the episode. | |
length_of_stay | integer | — | — | Days between start and end, for facility-based encounters. | |
admit_source_code | varchar | Admit source | — | Coded source of admission. | |
admit_source_description | varchar | — | — | — | |
admit_type_code | varchar | Admit type | — | Coded type of admission, for example emergency or elective. | |
admit_type_description | varchar | — | — | — | |
discharge_disposition_code | varchar | Discharge disposition | — | Coded disposition at discharge. | |
discharge_disposition_description | varchar | — | — | — | |
attending_provider_id | varchar | — | — | Practitioner with primary responsibility for the encounter. | |
attending_provider_name | varchar | — | — | — | |
facility_npi | varchar | — | — | NPI of the facility where care was delivered. | |
facility_name | varchar | — | — | — | |
facility_type | varchar | — | — | — | |
observation_flag | integer | — | — | — | |
lab_flag | integer | — | — | — | |
dme_flag | integer | — | — | — | |
ambulance_flag | integer | — | — | — | |
pharmacy_flag | integer | — | — | — | |
ed_flag | integer | — | — | Set when the episode involved emergency department services. | |
delivery_flag | integer | — | — | — | |
delivery_type | varchar | — | — | — | |
newborn_flag | integer | — | — | — | |
nicu_flag | integer | — | — | — | |
snf_part_b_flag | integer | — | — | — | |
primary_diagnosis_code_type | varchar | Code type | — | — | |
primary_diagnosis_code | varchar | ICD-10-CM | — | Principal diagnosis for the encounter. | |
primary_diagnosis_description | varchar | — | — | — | |
drg_code_type | varchar | — | — | — | |
drg_code | varchar | — | — | Diagnosis-related group assigned to the stay, where applicable. | |
drg_description | varchar | — | — | — | |
paid_amount | number | — | — | Sum of amounts paid across the claims in this encounter. | |
allowed_amount | number | — | — | Sum of contractually allowed amounts across the encounter. | |
charge_amount | number | — | — | Sum of amounts billed across the encounter. | |
claim_count | integer | — | — | Number of claims rolled into this encounter. | |
inst_claim_count | integer | — | — | — | |
prof_claim_count | integer | — | — | — | |
source_model | varchar | — | — | — | |
encounter_source_type | varchar | — | — | — | |
ingest_datetime | timestamp | — | — | — | |
dax_last_run | timestamp | — | — | Timestamp of the warehouse build that produced this row. | |
data_source | varchar | PK | — | not null | Label for the contributing system. Part of the grain. |
Querying
select *
from dax_core.encounter
limit 100;