Skip to content
Back to challenges
Expert: Enterprise Modeling SynthesisConcept Challengeadvanced35 min

Healthcare encounter snapshot

Model a patient-encounter accumulating snapshot with admit/discharge milestones, joined to a Type 2 provider dimension.

How this preview works
Preview this problem before signing in. Sign in to save progress and submit work.

Concept

fact-table-grain

The primary modeling idea this problem reinforces.

Requirements

4

Business needs the model must satisfy.

Read the concept guide: Fact table grain
Scenario

A hospital wants length-of-stay analytics and provider performance, attributed to the provider’s specialty and affiliation as they were at admission. An encounter moves through admission and discharge; provider attributes change over time.

Why this matters

This combines an accumulating snapshot (milestone timing) with Type 2 history (point-in-time provider context). Either alone gives wrong attribution or no timing.

Requirements
  • Create an encounter fact as an accumulating snapshot.
  • Add admitted-at and discharged-at milestone columns and a grain key on the encounter id.
  • Floor: make the provider dimension Type 2 with an effective-from and reference patient and provider by surrogate key.
  • Grade up: bound each provider version with an effective-to so the admission-time window is explicit.
Read-only starter workspace
Inspect the authored starting ERD, then open the workspace to edit and run the checks. Saving your progress needs a free account.

Template

Healthcare synthesis starter

The model users start from in the full workspace.

Entities

2

Seeded tables visible in the public preview.

Dialect

postgresql

Generated SQL target for this starter model.

Mini Map

This preview is read-only. Open the workspace to edit and verify; saving needs a free account.

Open workspace

Try the question first.

The discussion has other people's approaches and solutions. Give it a real attempt before you read them.