View medicare.qc_enrl_bene
Overview for medicare.qc_enrl_bene
Joined data for beneficiaries and enrollments
Join of tables: enrollments natural join beneficiaries
SQL/DDL Statement
CREATE view medicare.qc_enrl_bene AS SELECT *,
(CASE
WHEN dob IS NULL THEN 'MISSING'
WHEN dob_latest IS NOT NULL THEN 'AMBIGUOUS'
ELSE 'CONSISTENT'
END) AS consistent_dob,
(CASE
WHEN dod IS NULL THEN 'NONE'
WHEN dod_earliest IS NOT NULL THEN 'AMBIGUOUS'
ELSE 'CONSISTENT'
END) AS consistent_dod,
(CASE
WHEN sex LIKE '%,%' THEN 'AMBIGUOUS'
ELSE 'CONSISTENT'
END) AS consistent_sex,
(CASE
WHEN race LIKE '%,%' THEN 'AMBIGUOUS'
ELSE 'CONSISTENT'
END) AS consistent_race,
(CASE
WHEN orec IS NULL THEN 'MISSING'
WHEN orec_latest IS NOT NULL THEN 'AMBIGUOUS'
ELSE 'CONSISTENT'
END) AS consistent_orec
FROM medicare.enrollments natural join medicare.beneficiaries
;
COMMENT ON view medicare.qc_enrl_bene IS 'CREATED BY Dorieh: {"version": "0.4.5", "url": "file:///Users/misha/harvard/github/dorieh", "commit": null}. Created at 2026-07-13 11:20:49.406920';
Columns:
Column Name |
Column Type |
Datatype |
|---|---|---|
computed |
string |
|
computed |
string |
|
computed |
INT[] |
|
generated |
HLL_HASHVAL |
|
string |
||
generated |
boolean |
|
computed |
string |
|
computed |
string |
|
generated |
VARCHAR(12) |
|
computed |
VARCHAR(12) |
|
computed |
VARCHAR(12) |
|
computed |
VARCHAR(12) |
|
computed |
VARCHAR(12) |
|
computed |
VARCHAR(12) |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
generated |
boolean |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
generated |
boolean |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
generated |
INT |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |
|
string |
||
computed |
string |
|
computed |
char(5) |
|
string |
||
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |