Help using Base SAS procedures

Gap month Logic

Reply
Frequent Contributor
Posts: 90

Gap month Logic

Hi all,

Membno             GRPNUM                 EFFDAT                 EXPDAT                     GAP          GAP Month Reqd

123                             PI                      20120601                 99999999           0                         N/A

ABC                        LI                          20120201                20120201                  0                   N/A

ABC                        H1NAS                  20120201                20120331

ABC                        PAMAS                 20120401                99999999

DEF                        LI                          20120101                 20120229               2                       

DEF                        H1NAS                  20120401                20120430                                          20120301

DEF                        PAMAS                 20120601                99999999                                          20120501

GHI                        LI                          20120201                20120229               1                         

GHI                        H1NAS                  20120301                20120331

GHI                        PAMAS                 20120401                20120430

GHI                        PAMAS                 20120601                20120630                                          20120501

JKL                          LI                        20120401                20120430               0

JKL                          H1NAS                20120501                20120531

JKL                          PAMAS               20120601                9999999

MNO                     LI                          20120101                20120331                0

MNO                     H1NAS                  20120401                20120430

                              

SO the member ABC is not enrolled for the month of Jan and we don’t want this Memb to be included

SO the member DEF we need him for he has a GAP in enrollment for the month of March and May. So total GAP = 2

For the Member GHI, we need him as he has a GAP in enrollment for the month of May, so GAP = 1

For the Member JKL, we don’t need him as he has NO GAP even though he is not enrolled for Jan thru March

For the Member MNO, we don’t need him as his enrollment ended in April and he is no longer enrolled

We need ONLY those Members who have a GAP in their enrollment period

Please help me with the above logic.

Thanks in Advance

Ask a Question
Discussion stats
  • 0 replies
  • 135 views
  • 0 likes
  • 1 in conversation