Column medicare.qc_enrl_bene.orec_latest Lineage SVG

medicare.qc_enrl_bene.orec_latest medicare.qc_enrl_bene.orec_latest Non-null only when OREC was not consistent across the beneficiary's records (i.e. it changed over the years). Drives consistent_orec, analogously to dob_latest -> consistent_dob. CASE  WHEN MIN(orec) <> MAX(orec) THEN MAX(orec)END medicare.beneficiaries.orec medicare.beneficiaries.orec 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. (array_agg(orec ORDER BY year, orec))[1] medicare.beneficiaries.orec->medicare.qc_enrl_bene.orec_latest join natural medicare._beneficiaries.orec medicare._beneficiaries.orec 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. (array_agg(orec ORDER BY year, orec))[1] medicare._beneficiaries.orec->medicare.beneficiaries.orec Copied medicare._ps.orec medicare._ps.orec medicare._ps.orec->medicare._beneficiaries.orec  Aggregated On bene_id medicare.ps.orec medicare.ps.orec medicare.ps.orec->medicare._ps.orec Copied medicare.ps.orec_parent 8 incoming links (columns) medicare.ps.orec_parent->medicare.ps.orec