Articles
Healthcare Data Analyst Interview Case: Audit a 30-Day Readmission Metric
Work through a 30-day readmission interview case: define the cohort, handle transfers and duplicate encounters, apply a data watermark, and reconcile the rate.
An interviewer gives you a dashboard labeled “30-day readmission rate.” January shows 40%. The numerator and denominator look plausible, but a transfer, a planned admission, two versions of one encounter, and a late-month discharge sit in the extract. Would you sign off on the number?
This original healthcare data analyst case lets you audit the calculation rather than recite a definition. The central move is to decide which index discharges had a complete opportunity to be observed for 30 days, then ask whether each had a qualifying return. A raw internal dashboard rate is not the same as a CMS risk-standardized measure. The CMS 2026 Hospital-Wide Readmission measure form defines a particular Medicare fee-for-service population, exclusions, planned-readmission algorithm, and case-mix adjustment. Our synthetic exercise deliberately simplifies those rules. No candidate report establishes that a particular employer uses this case. For a related practice prompt, see Define and validate product metrics.
The case prompt: audit January's 40% claim
Suppose the internal metric owner says: “Count eligible acute inpatient discharges in January as index encounters. A return to acute inpatient care at any captured facility within 30 days counts if it is unplanned. An acute-to-acute transfer is one continuous episode, not a readmission. Show an observed, unadjusted rate. We extracted data on February 15.” Ask which timezone defines a date, whether cross-facility returns are captured, and which encounter version is final. For this exercise, use one consistent local time zone and a complete extract through February 15.
The unit is an encounter at discharge, not a patient-month or a claim line. One person can have more than one eligible index discharge over time. An index enters this January report only after its entire 30-day follow-up is available at the extract cutoff; under the stated rule, a January 16 discharge has matured by February 15, while a January 31 discharge has not. Agree on inclusive boundary behavior using timestamps before writing SQL.
| Raw encounter | Person | Discharge and next event | Audit disposition |
|---|---|---|---|
| E101 | P1 | Jan 2 home; E102 unplanned inpatient Jan 18 | Eligible index; one qualifying return |
| E102 | P1 | Jan 23 home | A possible later index, but not mature at Feb 15 |
| E201 | P2 | Jan 5 acute transfer; E202 receives patient Jan 6 | Continuation of an episode; do not treat E201 as a home discharge or E202 as a readmission |
| E202 | P2 | Jan 10 home; E203 unplanned inpatient Feb 1 | Eligible index; one qualifying return |
| E301 | P3 | Jan 7 home; E302 planned inpatient Jan 17 | Eligible index; planned event is excluded from this exercise's numerator |
| E401 | P4 | Jan 12 home; no captured return | Eligible index; no qualifying return |
| E501 | P5 | Jan 31 home; no captured return by Feb 15 | Immature index; outcome is not yet known |
| E601 | P6 | Jan 8 home, represented by two raw versions; no return | One eligible index after version deduplication |
The table is an invented interview fixture, not real patient data or a sample of the CMS measure. It intentionally makes two mistakes tempting: counting E201 and E202 as independent discharges in the same transfer episode, and counting both source versions of E601. A good answer names the source fields needed to validate these labels.
Work backward from the denominator
Start with the eligible discharged episodes. The January mature set is E101, E202, E301, E401, and E601: five indexes. E201 is an acute transfer; the receiving stay E202 is the discharge that ends that continuous episode in this exercise. E102 and E501 do not yet have a complete 30-day window by the February 15 extract. E601 appears twice in the raw feed but represents one encounter.
This yields a useful interview check: ask the interviewer whether the report is an “as of February 15” preliminary view or a fully matured January cohort. If the business needs the entire January discharge month, run the report after enough follow-up and data runout. Otherwise label the eligible cutoff explicitly. Dropping immature rows changes the population being reported; it should not be hidden in an WHERE clause or described as a complete January result.
Next, take one qualifying unplanned acute inpatient return per index. E101 has E102; E202 has E203. E301's E302 is planned under the exercise policy, so it is not a numerator hit. E401 and E601 have none. The numerator is two and the denominator is five, giving 2 / 5 = 40%. A person with two qualifying returns still contributes only one hit for that index. Do not count return encounters or joined claim lines as if they were additional index discharges.
Matching 40% does not validate the computation: offsetting errors could produce the same result. Show the five index IDs and two return IDs, then reconcile every exclusion. If a policy changes, document it and recompute.
Interview question: what is the index encounter?
Say the denominator definition before listing exclusions: “One eligible, completed acute inpatient episode discharged during the requested interval, with 30 complete days of observable follow-up.” Then ask whether the data are encounter-level, claim-level, or visit-level. Claims can have versions and line items; one hospital episode can span multiple technical records. Without a canonical episode identifier, you may need facility, admission/discharge timestamps, transfer disposition, and patient identity to reconstruct one episode.
Do not deduplicate by patient alone. P1's E101 and E102 are distinct encounters; E102 is merely immature for this particular extract. Deduplicate by stable encounter identity and valid version precedence. A late correction can change admission type or disposition, so a simple DISTINCT over selected fields is not enough. Preserve a version timestamp and a rule such as latest accepted record, with a tie-breaker and a count of overwritten rows.
The official CMS form provides a useful contrast: it has a detailed index eligibility definition, including age, enrollment, discharge and transfer rules. That is an official fact about that named measure, not evidence that the invented dashboard follows the same denominator. In an interview, ask for the measure steward's specification, value set versions, and effective dates. If those do not exist, propose a written contract before treating the metric as an operational KPI.
Interview question: what qualifies as a 30-day return?
Match on person identity, then require admit_ts to be after the index discharge and at or before the agreed 30-day endpoint. Confirm the return is a new acute inpatient episode and classified unplanned under the selected policy. An emergency department visit with no inpatient admission, a scheduled procedure, and the receiving leg of an acute transfer do not qualify under this case's instructions. Avoid a same-day timestamp collision by specifying whether contiguous claims are merged into one episode.
In production, the hardest part may be capture, not arithmetic. If your warehouse sees only one hospital's encounters, an unplanned return elsewhere may be missed. If the feed arrives late, recent indexes can appear artificially successful. If patient identifiers fail to link across systems, numerator loss may vary by facility or population. State the capture scope alongside the rate; a cross-facility claim requires evidence of cross-facility data. Do not imply a low observed rate proves good care when follow-up is incomplete.
Official CMS guidance for its hospital-wide measure distinguishes planned from unplanned readmissions and applies a specified algorithm. Its handling of a readmission following a planned readmission is more detailed than this exercise. Inference for the interview: citing that document helps you notice a missing policy decision, but copying one sentence of its logic into a different metric without the full specification risks a misleading result.
Interview question: can you write SQL without multiplying rows?
The following is SQL-shaped pseudocode, not a production query for a particular EHR schema. It shows the grain and the failure guards. Replace the episode and classification functions with governed, tested definitions. Materialize the final version of each encounter before joining anything with multiple rows.
WITH latest_encounter AS (
SELECT *
FROM (
SELECT e.*,
ROW_NUMBER() OVER (
PARTITION BY encounter_id
ORDER BY accepted_at DESC, source_version DESC
) AS version_rank
FROM raw_encounter e
WHERE accepted_at <= :as_of_ts
) v
WHERE version_rank = 1
), index_episode AS (
SELECT encounter_id, person_id, discharge_ts
FROM latest_encounter
WHERE discharge_ts >= :jan_start
AND discharge_ts < :feb_start
AND discharge_ts + INTERVAL '30 days' <= :as_of_ts
AND is_completed_acute_episode = TRUE
AND is_transfer_out = FALSE
), labeled_index AS (
SELECT i.encounter_id,
CASE WHEN EXISTS (
SELECT 1 FROM latest_encounter r
WHERE r.person_id = i.person_id
AND r.encounter_id <> i.encounter_id
AND r.admit_ts > i.discharge_ts
AND r.admit_ts <= i.discharge_ts + INTERVAL '30 days'
AND r.is_new_acute_episode = TRUE
AND r.is_unplanned = TRUE
) THEN 1 ELSE 0 END AS had_return
FROM index_episode i
)
SELECT COUNT(*) AS denominator,
SUM(had_return) AS numerator,
1.0 * SUM(had_return) / NULLIF(COUNT(*), 0) AS observed_rate
FROM labeled_index;
EXISTS makes the output one row per index even when an index has several matches. It does not fix incorrect episode grouping, incomplete identity linkage, or a wrong planned classification. In some SQL engines, adding an interval across daylight-saving transitions differs from counting calendar days; agree on the measure's time convention. The runout condition also assumes records through :as_of_ts have arrived and passed quality checks. If they have not, use a trusted data-complete watermark instead.
Interview question: how do you prove 2 out of 5?
Give the interviewer a reconciliation, not a dashboard screenshot. Start with raw January discharge rows, count unique encounter IDs, then show version-collapse removals, acute-transfer exclusions, immature follow-up exclusions, and final index IDs. At the return stage, print one row per index with earliest qualifying return ID, return admission timestamp, and planned/unplanned reason. E101→E102 and E202→E203 should be the only two matched pairs.
Build small invariant tests: E601's duplicate version must leave the denominator unchanged; E201's transfer must not create a readmission; E302's planned status must not increase the numerator; E501 must enter only after its window matures; and duplicating E203 in a claim-line table must not turn one index into two numerator events. Add boundary tests at exactly 30 days and at 30 days plus one tick. A change in any of these expected results should fail the pipeline before publication.
Then run a sensitivity table: rate with and without cross-facility capture; with a 30-day maturation cutoff versus the whole month after runout; and by facility after stable episode assignment. These are not alternative “correct answers” to average together. They show which policy and data coverage drive the number. Investigate mismatches against a sampled chart/claim review using authorized, privacy-safe workflows; never place identifiable patient records in interview take-home artifacts.
How to explain the finding to a stakeholder
A concise answer is: “Using the specified internal rule and data complete through February 15, five January discharges have mature 30-day windows. Two have an unplanned acute return, so the observed rate among this mature subset is 40%. I excluded a transfer leg, collapsed a duplicate encounter version, excluded a planned return from the numerator, and held out late-month discharges. I would not label this a complete January rate or a CMS risk-standardized result.”
The decision-maker then needs the next action: confirm the written measure contract, wait for January's full observation window and claim runout, verify cross-facility capture, and rerun a versioned result. If a new feed changes E301's classification or E501's follow-up, publish the revised numerator and denominator with an “as of” timestamp. Do not overwrite the old number without an audit trail. The answer demonstrates that a healthcare analyst can communicate uncertainty while still producing a testable estimate.
Sources and further reading
- CMS 2026 MIPS Hospital-Wide Readmission Measure Information Form — official specification used only to distinguish a formal risk-standardized measure from the original internal case.
- CMS QualityNet Readmission Measures overview — official context for named hospital readmission measures and their specifications.
- CMS Hospital Readmissions Reduction Program — official context for condition-specific, risk-standardized program measures and excess readmission ratios.