Data Architecture Overview

Healthcare RCM Analytics

Building a Data Story Through Modern Data Lakehouse Architecture

Revenue Cycle Management

End-to-end patient financial journey

Modern Lakehouse

Bronze - Silver - Gold Medallion

Data Integration Data Quality Business Intelligence Data Lineage

RCM Analytics Demo

Overview

Agenda

1. Use Case

Healthcare Revenue Cycle Management

2. Lakehouse Data Model

Bronze - Silver - Gold Medallion

3. Business Glossary

Domain terminology and definitions

4. Data Quality

Checks, tests, and validations

5. Lineage & Observability

Data flow tracking and monitoring

6. Pipeline Operations

Scheduler requirements

7. Business Reports

Patient invoices and EOB statements

8. Demo

Live walkthrough

Use Case

Claimwise - The Data Story

Meet Claimwise, a fictitious healthcare company embracing data transformation. Data flows through: Patient Management System (MSSQL) – clinical interactions and Claims Processing System (Oracle) – financial transactions for Revenue Cycle Management.

Patient Mgmt

MSSQL

S3 Landing

CSV Extracts

Claims Proc

Oracle

Source Systems (OLTP) - Extract and Load

Landing Zone
BRONZE
SILVER
INTERMEDIATE
Admin
Billing
Clinical
GOLD
Dashboards

Lakehouse Data Pipeline (OLAP) - Transformation

Datasets

The Fictitious RCM Demo Datasets

Synthetically created with referential integrity

Users

Patients, Doctors, Staff, Payers

Clinical Events

Encounters, Procedures, Activities

Financial

Claims, Collections, Health Plans

Lakehouse - Bronze Layer

  • CSV files stored in S3 buckets
  • Optional external tables can reference CSV files without moving data
  • Tables can be created for selected subsets of interest

Complete Patient Financial Journey

Tracks the complete revenue cycle from patient registration through final payment collection.

Lakehouse

Silver Layer - Staging Models

Base tables materialized as views against bronze data

stg_facilities
idPK
facilityIDString
nameString
locationString
contactInfoString
stg_activities
idPK
activityIDString
claimIDString
activityDateDateTime
activityTypeString
diagnosisCodeString
stg_users
idPK
userIDString
userTypeString
nameString
dateOfBirthDateTime
departmentString
stg_health_plans
idPK
healthPlanIDString
planNameString
payerIDInt
stg_collections
idPK
claimIDString
dateDateTime
amountCollectedFloat
statusString
stg_claims
idPK
claimIDString
patientIDInt
payerIDInt
statusString
amountFloat
stg_encounters
idPK
encounterIDString
patientIDInt
doctorIDInt
facilityIDInt
dateDateTime

One-to-One Mapping

Each source table → corresponding staging model (views)

Minimal Transformations

Column renaming, type casting, date standardization

Lakehouse

Silver Layer - Intermediate Persona Views

Purpose-built transformations organized by user personas

int_staff
staff_idPK
staff_codeString
staff_nameString
departmentString
roleString
contactInfoString
int_patients
patient_idPK
patient_codeString
patient_nameString
dateOfBirthDateTime
total_encountersBigInt
total_claimsBigInt
int_doctors
doctor_idPK
doctor_codeString
doctor_nameString
specialtyString
total_patients_seenBigInt
facility_namesString
int_payers
payer_idPK
payer_codeString
payer_nameString
total_claims_receivedBigInt
total_claims_amountFloat
total_health_plansBigInt

Persona-Based Views

  • Single user entity split into focused persona views
  • Business rules applied through view definitions
  • Aggregated computations for downstream analysis

Data Quality Enforced

  • Uniqueness and not_null constraints
  • Referential integrity with staging tables
  • Accepted_values and custom validations
Lakehouse

Gold Layer - Star Schema

Kimball Dimensional Modelling with 8 dimensions and 3 fact tables

dim_facility
facility_id, code, name location, contact_info
dim_date
date_id, full_date, year month, quarter, day_of_week
dim_health_plan
health_plan_id, code, name payer_key, enrolled_patients
dim_patient
patient_id, code, name dateOfBirth, total_encounters
fct_encounters
encounter_id, encounter_code patient_key, doctor_key, facility_key encounter_type, duration_minutes
fct_claims
claim_id, claim_code, claim_date patient_key, payer_key, facility_key claim_status, claim_amount, claim_count
fct_collections
collection_id, claim_key, payer_key collection_date, collected_amount successful_collect, collection_rate
dim_payer
payer_id, code, name total_claims, unique_patients
dim_doctor
doctor_id, code, name specialty, is_current
dim_department
department_id, name staff_count
dim_diagnosis
diagnosis_id, code is_current, valid_from/to
SCD Type 2 Denormalized Facts Columnar Optimized
Governance

Business Glossary

Domain terminology linked to technical metadata

Healthcare Providers Domain
Provider/DoctorHealthcare professional authorized to provide medical servicesusers.userType='DOCTOR'
SpecialtyMedical field of expertise for a providerusers.specialty
Provider IDUnique identifier for healthcare providerusers.userID
Provider EncountersPatient visits performed by providerencounters.doctorID
Clinical Domain
EncounterA patient visit or consultation eventencounters.encounterID
Diagnosis CodeICD-10 code for medical conditionactivities.diagnosisCode
Procedure CodeCPT code for medical procedureactivities.procedureCode
Activity TypeType of clinical activity performedactivities.activityType
Financial Domain
ClaimRequest for payment submitted to payerclaims.claimID
CollectionPayment received for a claimcollections.amount
RemittancePayment explanation from payerclaims.status
CopayFixed amount paid by patientclaims.copayAmount
Revenue Cycle Domain
Days in ARAverage days to collect paymentCalculated metric
Collection RatePercentage of billed amount collectedCalculated metric
Denial RatePercentage of claims deniedclaims.status='DENIED'
Clean Claim RateClaims processed without errorsCalculated metric

Metadata Integration

All business terms are linked to technical metadata for complete traceability and governance.

Quality

Data Quality Checks & Validations

Comprehensive validation framework across data layers

Daily Validation

  • Uniqueness constraints
  • Format validations
  • Code validations
  • Not-null checks

Weekly Checks

  • Provider-service matching
  • Payment reconciliation
  • Documentation completeness
  • Cross-reference validation

Monthly Audits

  • Compliance review
  • Pattern analysis
  • Outlier detection
  • Trend monitoring

Quality Objectives

Identify Issues

Data quality problems

Validate Rules

Business logic

Ensure Integrity

Referential checks

Monitor Compliance

Process standards

Observability

Data Lineage & Observability

End-to-end visibility from source to exposure

Source
activities
claims
collections
encounters
facilities
health_plans
users
Silver
stg_activities
stg_claims
stg_collections
stg_encounters
stg_facilities
stg_health_plans
stg_users
Intermediate
int_patients
int_doctors
int_payers
int_staff
Facts
fct_encounters
fct_claims
fct_collections
Exposure
healthcare_analytics

Impact Analysis

Understand downstream effects

Root Cause

Trace issues to source

Compliance

Audit trail for regulations

Observability

Unity Catalog Lineage - Live from Databricks

Captured from the production run - Databricks records lineage automatically from the SQL, no configuration needed

Unity Catalog table lineage graph for workspace.gold.fct_claims

Table lineage - bronze.claims and bronze.users flow through silver staging and intermediate views into gold.fct_claims

Unity Catalog column-level lineage for fct_collections.collected_amount

Column lineage - bronze.collections.amountCollected traced field-by-field to gold.fct_collections.collected_amount

Every dbt run refreshes this graph - impact analysis and root-cause tracing come free with the platform

Analytics

Claimwise Revenue Pulse - Live Dashboard

Databricks AI/BI dashboard, deployed as code (make dashboard) - every widget reads the gold metric layer

Executive Overview page: KPI counters, billed vs collected trend, claim status mix

Executive Overview - KPI cards, billed vs collected trend, claim status mix, AR aging

Payers and Providers page: payer scorecard table and open AR by payer

Payers & Providers - scorecard and open AR by payer

Claims Operations page: lifecycle funnel and denied claims by month

Claims Operations - funnel, denials, volume, and status detail

Semantic Layer

Metric Layer - One Definition, Every Consumer

KPI math lives in gold metric models (gold.mtr_*) plus a Unity Catalog metric view - consumers only select, never recompute

Gold Facts

fct_claims, fct_collections, fct_encounters

Metric Layer

6 mtr_* dbt models + UC metric view claimwise_metrics

collection rate · denial rate · open AR · aging · cycle days

Consumers

Dashboard · Genie · ad-hoc SQL

Consistency: every KPI is computed once in the metric layer, so the dashboard, Genie, and ad-hoc SQL can never disagree on a number.

Change once, ship everywhere: metrics are version-controlled, tested dbt models - update a definition in one file and every consumer follows, with no per-report rework.

Unity Catalog lineage from silver staging through gold facts to mtr_executive_summary and its dashboard consumer

Real end-to-end lineage - silver → gold facts → mtr_executive_summary → dashboard (assets that read data)

Operations

Pipeline Scheduler Requirements

Orchestration and monitoring for data pipelines

Pipeline #1 - Extract & Load

  • Schedule: Every 2 hours
  • Blockout: Sunday 2-4 AM (Maintenance)
  • Failure: Retry once after 15 min, max 2 times
  • Alerts: Notifications for each failure
  • Observability: Emit OpenLineage events

Pipeline #2 - Transform

  • Trigger: Depends on Pipeline 1 completion
  • Alternative: Execute every 4 hours if P1 doesn't run
  • Freshness: Skip if data is stale
  • Logging: Detailed logs for reporting
  • Observability: Centralized log stack

Pipeline Components

Transformations
Jobs
Scheduler
Logging
Data Source Connections
VFS
Profiles
Alerts/Notifications
Data Quality Checks
Reporting

Business Reports - EOB Statement

Explanation of Benefits - Multi-page statement for patients

Claimwise

Explanation of Benefits (EOB) Statement

Member Information
Ashley Bird
Member ID: HC360-120
Group: HC360-98765
Provider Information
Smith-Foster Clinic
7569 Kevin Rapids Apt. 752
Novaport
Claim Summary
Total Charges
$5,081.71
Plan Paid
$4,319.45
You Owe
$762.26
Your Deductible Progress
Individual Deductible$100 of $1,000
Out-of-Pocket Maximum$762.26 of $5,000
Claimwise
Claim Details
Service Date Description Amount Plan Paid You Owe
10/31/2024 General Consultation $5,081.71 $4,319.45 $762.26
Claim Processing Details
Claim Number:194
Processed Date:1/10/2025
Status:Processed
Appeal Rights

If you disagree with this decision, you may appeal within 30 days.

Claimwise
Important Information
Your Benefits at a Glance
Plan NameAetna Platinum EPO
Plan Year2025
Annual Benefit Maximum$5,000
Remaining Balance$3,500
Understanding Your Costs

Your plan includes cost-sharing features like deductibles, copayments, and coinsurance. These determine your out-of-pocket costs for covered services.

Terms to Know
Deductible

The amount you pay before your health plan begins to pay.

Copayment

A fixed amount you pay for covered services.

Dynamic Multi-Page Report

Member info, claim summary, deductible progress, service details.

Distribution

Generated reports partitioned by type and date, delivered via SMTP.

Data Generator

Claimwise Synthetic Data Generator

Configurable synthetic data for demos, testing, and development

Configurable Volume Controls

  • Patients: 50 - 2,000 records
  • Doctors: 5 - 100 providers
  • Facilities: 2 - 50 locations
  • Encounters: 100 - 5,000 visits
  • Claims: 100 - 7,500 claims
  • Date Range: Custom start/end dates

Multiple Interfaces

  • Marimo Notebook: Interactive UI with sliders
  • CLI Module: Command-line for automation
  • Docker: Containerized execution
  • Output Formats: CSV, Parquet, JSON
  • Reproducible: Seed parameter for consistency
  • Realistic: Faker library integration
Configure
Generate
Export
Load to DW
Demo Ready

Quick Start Commands

# Interactive notebook
$ marimo run rcm_generator.py
# DuckDB with multi-schema (patient_mgmt, claims_proc, s3_landing)
$ python rcm_module.py --format duckdb --patients 500 --claims 1500
# Generate as Parquet files
$ python rcm_module.py --patients 500 --claims 1500 --format parquet
# Docker with large dataset
$ docker-compose up generate-large
Data Generator

Generated Data Model

7 interrelated datasets with referential integrity

Master Data
users
Patients, Doctors, Staff
facilities
Hospitals, Clinics
health_plans
Insurance Plans
Transactions
encounters
Patient Visits
claims
Medical Claims
Events
claim_activities
Lifecycle Events
collections
Payments Received

Demo

50 patients, 100 claims

~1,500 records

Small

100 patients, 300 claims

~3,000 records

Medium

500 patients, 1,500 claims

~15,000 records

Large

2,000 patients, 7,500 claims

~75,000 records

Realistic Data Quality

Valid NPI numbers, ICD-10/CPT codes, realistic names and addresses via Faker.

Full RCM Lifecycle

Patient → Encounter → Claim → Activities → Collection. Complete revenue cycle.

Summary

Key Takeaways

Healthcare RCM Analytics with Modern Data Lakehouse

Unified Data Model

Bronze - Silver - Gold Medallion

Data Quality

Comprehensive validation at every layer

Full Lineage

End-to-end traceability with OpenLineage

Business Glossary

Domain terminology linked to metadata

Operational Excellence

Scheduled pipelines with monitoring

Business Intelligence

Reports and dashboards for stakeholders

Modern Data Architecture for Healthcare

From source systems to actionable insights - a complete data story