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
FROM medicare.enrollments natural join medicare.beneficiaries
;
COMMENT ON view medicare.qc_enrl_bene IS 'CREATED BY Dorieh: {"version": "0.2.3", "url": "https://github.com/NSAPH-Data-Platform/dorieh", "commit": "bf4644403297aaf478f6a42717508dde55da409a"}. Created at 2024-08-12 13:31:09.791600';
Columns:
Column Name |
Column Type |
Datatype |
---|---|---|
computed |
string |
|
computed |
string |
|
computed |
INT[] |
|
generated |
HLL_HASHVAL |
|
string |
||
generated |
boolean |
|
computed |
string |
|
computed |
string |
|
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 |
|
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 |
|
string |
||
computed |
string |
|
computed |
char(5) |
|
string |
||
computed |
string |
|
computed |
string |
|
computed |
string |
|
computed |
string |