Skip to content
Dipen Patel
Data + systems + applied AI
Healthcare data · Since 2014
Expertise

Healthcare data that holds up under checking.

Integration, data engineering and applied AI, worked the same way every time: Trace → Prove → Harden → Measure.

Integration, validation and AI

FHIR R4

FHIR ingestion with SMART on FHIR and OAuth 2.0, alongside CCDA generation, consumption and validation.

  • SMART on FHIR authorization with OAuth 2.0
  • CCDA section checks across health information exchanges
  • Patient matching and routing to the correct facility

Data engineering, led by change data capture

CDC is the approach I use most. Healthcare sources hold millions of records, and a daily load only needs what changed. The method is simple to state; the hard parts are deletes, late changes and proving the target still matches the source.

The flow

  1. 1

    Capture

  2. 2

    Land raw

  3. 3

    Validate & quarantine

  4. 4

    Merge idempotently

  5. 5

    Reconcile

  6. 6

    Publish

Capture methods and when to use each

Log-based capture

Use when

The source exposes a transaction log or replication stream and you need low latency, deletes and every intermediate change.

Watch for

Needs database access and agreement from the source owner; schema changes and log retention must be monitored.

Timestamp or ID watermarks

Use when

Rows carry a reliable last-updated time or an increasing key, and a scheduled pull is fresh enough.

Watch for

Misses hard deletes and any change that does not update the column; late commits can slip behind the watermark without an overlap window.

Row fingerprints (hashes)

Use when

There is no log access and no trustworthy timestamp, but you can read the full table or a bounded slice.

Watch for

Each comparison reads the whole slice, so cost grows with volume; it shows what changed, not the order of changes.

The hard parts

Deletes
Watermarks cannot see a row that is gone. Use log deletes, soft-delete flags, or a periodic key comparison against the source.
Late or replayed changes
Re-read an overlap window behind the watermark and order changes by source sequence, so an old event cannot overwrite a newer one.
Reconciliation
Compare counts, key sets and column checksums between source and target by time window, and record every result.
Idempotent merges
Merge on a stable business key with a version or sequence check, so running the same batch twice gives the same result.

Related concepts

Idempotency
A re-run loads nothing twice. Loaded files are skipped and merges are keyed.
Schema drift
Compare source columns, types and null rates with what is expected, and decide whether to adapt, alert or stop.
Lineage
Every number can be traced back to the files, runs and rules that produced it.
Quarantine
Bad records are set aside with a visible reason instead of disappearing or breaking the load.
Medallion layers
Bronze keeps raw source data, Silver holds cleaned data, and Gold holds data prepared for products.
Backfills
Historical reloads run through the same idempotent path as daily loads, bounded by date and reconciled afterwards.
Data contracts
The source and its consumers agree on fields, meanings, freshness and ownership, and changes are announced before they ship.

Weighing a CDC design for your own sources?

Describe them in the CDC Advisor for a structured first recommendation.

Open the CDC Advisor