Column medicare.qc_enrl_bene.orec
Overview of column orec in table medicare.qc_enrl_bene
Table |
|
Qualified name |
medicare.qc_enrl_bene.orec |
Datatype |
string |
Column type |
computed |
Reference |
https://resdac.org/cms-data/variables/original-reason-entitlement-code |
Original Reason for Entitlement Code (OREC). Set at the time of enrollment and invariant for the life of the beneficiary, hence a beneficiary-level attribute. The canonical value is taken from the earliest enrollment year (ties broken by smallest code, for reproducibility). If the raw data is inconsistent across years the divergence is surfaced via orec_latest / consistent_orec rather than silently affecting joins.
Expressions
SELECT (array_agg(orec ORDER BY year, orec))[1]
Data lineage for column medicare.qc_enrl_bene.orec