Hi,
I'm in urgent need of some help troubleshooting this code for any errors or problems? Any assistance would be greatly appreciated! Thanks.
SAS EXAMPLE TO TROUBLESHOOT
This code uses SAS to select claims from a specific claim system (Variable: systemCode; Value: 808) with two specific CPT Codes (Variable: CPTCode) in the current year. In addition, we are only interested in claims for members who have coverage through employer groups (Variable: EMP_GRP) based in Georgia.
VERSION TO TROUBLESHOOT
PROC FORMAT;
value $fmtCPTCode
2211, 2222 = 'include'
other = exclude';
run;
FILENAME DIR "/data/misc/;
%LET syscd =808;
DATA claims_extract;
set DIR.dataClaim;
if SUBSTR(systemCode, 1, 3) = syscd ;
where PUT(CPTCode, $fmtCPTCode) = include;
Where serviceDate = YEAR(DATE());
Keep member_id CPTCode servicedate emp_grp claim_number;
run;
/*Documentation: Find Georgia EMP_GRPs;
Data emp_grp_ga;
Set DIR.EMP_GROUP_INFO (Keep emp_grp state emp_grp_name);
Where state in (GA);
Run;
PROC SORT DATA = claims_extract;
BY CPTCode EMP_GRP;
run;
PROC SORT DATA = EMP_GRP_GA;
BY state emp_grp;
run;
DATA DIR.results;
merge claims_extract (in=a) emp_grp_ga (in=a);
by emp_grp;
if a;
run;
Proc freq data=dir.results;
Tables CPTCODE*member_id;
Run;
I'm in urgent need of some help troubleshooting this code for any errors or problems? Any assistance would be greatly appreciated! Thanks.
SAS EXAMPLE TO TROUBLESHOOT
This code uses SAS to select claims from a specific claim system (Variable: systemCode; Value: 808) with two specific CPT Codes (Variable: CPTCode) in the current year. In addition, we are only interested in claims for members who have coverage through employer groups (Variable: EMP_GRP) based in Georgia.
VERSION TO TROUBLESHOOT
PROC FORMAT;
value $fmtCPTCode
2211, 2222 = 'include'
other = exclude';
run;
FILENAME DIR "/data/misc/;
%LET syscd =808;
DATA claims_extract;
set DIR.dataClaim;
if SUBSTR(systemCode, 1, 3) = syscd ;
where PUT(CPTCode, $fmtCPTCode) = include;
Where serviceDate = YEAR(DATE());
Keep member_id CPTCode servicedate emp_grp claim_number;
run;
/*Documentation: Find Georgia EMP_GRPs;
Data emp_grp_ga;
Set DIR.EMP_GROUP_INFO (Keep emp_grp state emp_grp_name);
Where state in (GA);
Run;
PROC SORT DATA = claims_extract;
BY CPTCode EMP_GRP;
run;
PROC SORT DATA = EMP_GRP_GA;
BY state emp_grp;
run;
DATA DIR.results;
merge claims_extract (in=a) emp_grp_ga (in=a);
by emp_grp;
if a;
run;
Proc freq data=dir.results;
Tables CPTCODE*member_id;
Run;