CASE WHEN (A.INSTITUTION = 'UMS02' AND A.DEGREE = 'CGS') OR
(A.INSTITUTION = 'UMS06' AND A.ACAD_PLAN LIKE '%-CERT') OR
(A.INSTITUTION = 'UMS06' AND A.ACAD_PLAN LIKE '%-CGS') THEN
CASE WHEN (A.Admit_Term = Strm OR (to_number(A.STRM) - to_number(ltrim(A.ADMIT_TERM, ' '))) = 80) THEN
CASE WHEN A.Institution = 'UMS05' AND A.Prog_Reason = 'RADM' THEN 'Readmit Student'
WHEN A.ADMIT_TYPE IN ('FYR', 'EFY') AND (A.ACAD_LEVEL_BOT in ('01','10')
or A.Um_Last_Sch_Type IN ('SCD', 'SHS')) THEN 'First-Time Undergraduate Student'
WHEN A.ADMIT_TYPE IN ('GRD', 'GR6', 'GR2', 'DAT') THEN 'Graduate Student'
WHEN A.ADMIT_TYPE = 'LAW' AND A.ACAD_LEVEL_BOT = 'L1' THEN 'Law Student'
WHEN A.ADMIT_TYPE = 'PBA' THEN 'Post-Baccalaureate Student'
WHEN A.ADMIT_TYPE = 'REA' THEN 'Readmit Student'
WHEN A.ADMIT_TYPE = 'TRF' AND A.Institution <> DECODE(A.Ext_Org_Id,
'0136250', 'UMS05', '0136246', 'UMS01', '0136247', 'UMS02',
'0136248', 'UMS03', '0136249', 'UMS04', '0136252', 'UMS07',
'0136392', 'UMS06', 'OTHER') THEN 'Transfer Student'
ELSE 'Continuing Student' END
ELSE 'Continuing Student' END
WHEN A.ACAD_PLAN = 'IEI' AND A.INSTITUTION = 'UMS05' THEN 'Non-Degree'
WHEN A.ACAD_PLAN LIKE 'VIS%' AND A.INSTITUTION = 'UMS05' AND
A.ACAD_CAREER IN ('GRAD', 'UGRD') THEN 'Non-Degree'
WHEN A.ACAD_PROG_PRIMARY IN ('NDEC', 'NECN', 'NDUG', 'DIST', 'P-NON', 'NONCR',
'NDPR', 'NDGR', 'GRNON', 'NDPN', 'NSEU', 'NDUMA', 'APNDU') THEN 'Non-Degree'
WHEN A.ACAD_PROG_PRIMARY LIKE '%UN' THEN 'Non-Degree'
WHEN A.ACAD_PROG_PRIMARY LIKE '%GN' THEN 'Non-Degree'
WHEN A.ACAD_CAREER = 'NCRD' AND A.INSTITUTION = 'UMS07' THEN 'Non-Degree'
WHEN (A.Admit_Term = Strm OR (to_number(A.STRM) - to_number(ltrim(A.ADMIT_TERM, ' '))) = 80) THEN
CASE WHEN A.Institution = 'UMS05' AND A.Prog_Reason = 'RADM' THEN 'Readmit Student'
WHEN A.ADMIT_TYPE IN ('FYR', 'EFY') AND (A.ACAD_LEVEL_BOT in ('01','10') or
A.Um_Last_Sch_Type IN ('SCD', 'SHS')) THEN 'First-Time Undergraduate Student'
WHEN A.ADMIT_TYPE IN ('GRD', 'GR6', 'GR2', 'DAT') THEN 'Graduate Student'
WHEN A.ADMIT_TYPE = 'LAW' AND A.ACAD_LEVEL_BOT = 'L1' THEN 'Law Student'
WHEN A.ADMIT_TYPE = 'PBA' THEN 'Post-Baccalaureate Student'
WHEN A.ADMIT_TYPE = 'REA' THEN 'Readmit Student'
WHEN A.ADMIT_TYPE = 'TRF' AND A.Institution <>
DECODE(A.Ext_Org_Id, '0136250', 'UMS05', '0136246', 'UMS01', '0136247', 'UMS02', '0136248', 'UMS03',
'0136249', 'UMS04', '0136252', 'UMS07', '0136392', 'UMS06', 'OTHER') THEN 'Transfer Student'
ELSE 'Continuing Student' END
ELSE 'Continuing Student' END