尝试从数据中排除过程代码

时间:2018-05-29 15:39:41

标签: sas

我正在尝试从数据中排除程序代码:

Excludes antipsychotic meds (Long-Acting Injections) dispensed
DATA CLMSPULL_NEW2;
SET CLMSPULL_NEW;


Excludes hospice codes
DATA CLMSPULL_NEW3;
SET CLMSPULL_NEW2;

这些是内置于宏中的代码:

/*Exclusions*/
%LET HOSPICE = 
        ('99377','99378','G0182','G9473','G9474','G9475','G9476',
        'G9477','G9478','G9479','Q5003','Q5004','Q5005','Q5006','Q5007','Q5008','Q5010','S9126','T2042',
        'T2043','T2044','T2045','T2046','0143', '0144', '0149', '0150', '0151', '0152', '0153', '0154', 
        '0159', '0160', '0164', '0167', '0169', '0200', '0201', '0202', '0203', '0204', '0206', '0207', 
        '0208', '0209', '0210', '0211', '0212', '0213', '0214', '0219', '0720', '0721', '0722', '0723', 
        '0724', '0729', '0987', '99221','99222','99223','99231','99232','99233',    
        '99238','99239','99251','99252','99253','99254','99255','99291');

    /*Long-Acting Injections*/  
%LET LAINJ = ('J0401','J1631','J2358','J2426','J2680','J2794');

1 个答案:

答案 0 :(得分:0)

不是很清楚你要问的是什么,但这是一个尝试,假设你的数据集中有两列hospicelainj

proc sql;
  create table CLMSPULL_cleaned as
    select * 
      from CLMSPULL_NEW
     where hospice not in &hospice
       and lainj not in &laing;
quit;