Skip to navigation

Encounters & Service Lines

The core of Data Share: one row per encounter, with claim, provider, patient and insurance fields flattened on, and one row per service line. Claim submissions, financial rollups and transactions all join to these tables on encounter_id and service_line_id.

Tables

TableOne row perPrimary keyShape
export_encounterEncounter: one visit, billed as one claimencounter_idCurrent state
export_service_lineService line (billed procedure), including deleted onesservice_line_idCurrent state

Notes

  • There’s no separate claim table. Claim fields such as claim_id and claim_status are on export_encounter.
  • Diagnoses appear at both grains. export_encounter.diagnosis_codes lists every code on the encounter. Each service line points to up to four of them (diagnosis_zero_code to diagnosis_three_code).

Common queries

Service lines with their encounter

SELECT
e.encounter_id,
e.date_of_service,
sl.service_line_id,
sl.procedure_code
FROM export_encounter e
JOIN export_service_line sl
ON e.encounter_id = sl.encounter_id