I am working with Claims data in which we have four different encounter types: Dental, Institutional, Professional and Pharmacy. I need to develop separate reports for different organizations in SAS Proc Tabulate which show claims by these four types. Some organizations have all four types and others have only 3. But if a plan does not have one particular type, I still have to show it with missing values and a header in the report.
Say Plan A has only Institutional, Pharmacy and Professional types and no Dental claims. I want to show all the four types listed out with missing values for Dental. Can this be achieved with a Proc tabulate step? (Or will I have to modify the data set to put null values for each type?) Any help will be much appreciated.
This is the main code:
proc tabulate data=servmnth format=COMMA.0;
class plan_alias encounter_type service_Month;
var netted_claim_count;
format encounter_type $enc.;
table encounter_type= ' ' ALL='Total', sum=' '*netted_claim_count= 'Netted
Claims by Service Month'*service_Month = ' ';
where plan_alias="&plan.";
run;
It was all good until I realized some plans were straight up missing one or two encounter types. I tried putting a format for encounter type using proc format but that did not work. I am wondering if there is anything I can attach to encounter_type variable in the table statement which would show 4 rows no matter what.
classdata
option in proc tabulate? This might help. – user667489