886: --
887: cursor c_pil_popl is
888: select pel.enrt_perd_end_dt,
889: pel.procg_end_dt
890: from ben_pil_elctbl_chc_popl pel,
891: ben_elig_per_elctbl_chc epe
892: where epe.elig_per_elctbl_chc_id = p_elig_per_elctbl_chc_id
893: and epe.business_group_id = l_business_group_id
894: and epe.pil_elctbl_chc_popl_id = pel.pil_elctbl_chc_popl_id
900: -- where clause this should only return 1 row.
901: --
902: cursor c_cm_enrt_perd_strt_dt is
903: select enrt_perd_strt_dt
904: from ben_pil_elctbl_chc_popl
905: where per_in_ler_id = l_per_in_ler_id
906: and ((l_pgm_id is not null and pgm_id = l_pgm_id)
907: or (l_pgm_id is null and pl_id = l_pl_id)
908: or (l_pgm_id is null and l_pl_id is null))
909: and business_group_id = l_business_group_id;
910: --
911: cursor c_cm_enrt_perd_end_dt is
912: select min(enrt_perd_end_dt)
913: from ben_pil_elctbl_chc_popl
914: where per_in_ler_id = l_per_in_ler_id
915: and ((l_pgm_id is not null and pgm_id = l_pgm_id)
916: or (l_pgm_id is null and pl_id = l_pl_id)
917: or (l_pgm_id is null and l_pl_id is null))
918: and business_group_id = l_business_group_id;
919: --
920: cursor c_cm_dflt_asnd_dt is
921: select min(dflt_asnd_dt)
922: from ben_pil_elctbl_chc_popl
923: where per_in_ler_id = l_per_in_ler_id
924: and ((l_pgm_id is not null and pgm_id = l_pgm_id)
925: or (l_pgm_id is null and pl_id = l_pl_id)
926: or (l_pgm_id is null and l_pl_id is null))
927: and business_group_id = l_business_group_id;
928: --
929: cursor c_cm_auto_asnd_dt is
930: select min(auto_asnd_dt)
931: from ben_pil_elctbl_chc_popl
932: where per_in_ler_id = l_per_in_ler_id
933: and ((l_pgm_id is not null and pgm_id = l_pgm_id)
934: or (l_pgm_id is null and pl_id = l_pl_id)
935: or (l_pgm_id is null and l_pl_id is null))
936: and business_group_id = l_business_group_id;
937: --
938: cursor c_cm_elcns_made_dt is
939: select min(elcns_made_dt)
940: from ben_pil_elctbl_chc_popl
941: where per_in_ler_id = l_per_in_ler_id
942: and ((l_pgm_id is not null and pgm_id = l_pgm_id)
943: or (l_pgm_id is null and pl_id = l_pl_id)
944: or (l_pgm_id is null and l_pl_id is null))
7331: pil.person_id,
7332: epe.fonm_cvg_strt_dt
7333: from
7334: ben_elig_per_elctbl_chc epe,
7335: ben_pil_elctbl_chc_popl pel,
7336: ben_per_in_ler pil
7337: where
7338: epe.elig_per_elctbl_chc_id=p_elig_per_elctbl_chc_id and
7339: pel.pil_elctbl_chc_popl_id = epe.pil_elctbl_chc_popl_id and