Help using Base SAS procedures

proc format report not quite right

Accepted Solution Solved
Reply
Contributor
Posts: 69
Accepted Solution

proc format report not quite right

I have tried various ways to make this output right but just not quite there with how I am doing my location, procedure, etc.

proc report nowd data=cardiac.tinrestudyfinal (where =(prov_tin = &prov_tin));

title1 'Provider TIN Level Restudy and PCI Redo Procedure Breakouts';

title2 'By Place of Service';

column ('Cardiac Metric Component' table)

('Calculation by Place of Service and Procedure' procedure location)

location procedure fakevar;

  define prov_tin / group ' ' Noprint ;

  define table / group ' ' order=formatted;

  define location / across ' ' order=formatted;

  define procedure / across ' ' style(column)={just=r};

  define fakevar/ computed noprint;

  compute fakevar;

    fakevar=1;

  endcomp;

  run;

ods rtf close;

One example of the table looks like this. There could be other procedures. These are the other possible procedures that could be in the output. cath ct prt perf tee tte secho cabg pci stemi nstemi. But, this particular tin has only pci cath perf and tte. I pasted below what the output has to look like.

PROV_TINsub_tabletablePROCEDURELOCATION
12IP182PCI1-182 PCI REDO RATEPCIINPATIENT
12OP182PCI1-182 PCI REDO RATEPCIOUTPATIENT
12OP182PCI1-182 PCI REDO RATEPCIOUTPATIENT
12OP30PCI1-30 PCI REDO RATEPCIOUTPATIENT
12IP30PCI1-30 PCI REDO RATEPCIINPATIENT
12OP30PCI1-30 PCI REDO RATEPCIOUTPATIENT
12IPMAJCATH3MTH MAJOR RESTUDY RATECATHINPATIENT
12OPMAJCATH3MTH MAJOR RESTUDY RATECATHOUTPATIENT
12OFCMAJPERF3MTH MAJOR RESTUDY RATEPERFOFFICE/CLINIC
12OFCMAJPERF3MTH MAJOR RESTUDY RATEPERFOFFICE/CLINIC
12OFCMINTTE3MTH MINOR RESTUDY RATETTEOFFICE/CLINIC
12OFCMINTTE3MTH MINOR RESTUDY RATETTEOFFICE/CLINIC
12IPMINTTE3MTH MINOR RESTUDY RATETTEINPATIENT
12OFCMINTTE3MTH MINOR RESTUDY RATETTEOFFICE/CLINIC

Cardiac Metric ComponentCalculation by Place of Service and Procedure
INPATIENTOUTPATIENTOFFICE/CLINIC
CATHTTEPCICATHPCIPERFTTE
1-182 DAY PCI REDO RATE12
1-30 DAY PCI REDO RATE12
3-MONTH MAJOR RESTUDY RATE1122
3-MONTH MINOR RESTUDY RATE13

The format of the wanted output is not quite right on the screen so attaching it.


Accepted Solutions
Solution
‎08-08-2013 09:45 PM
Super Contributor
Posts: 307

Re: proc format report not quite right

Just a few things need to be changed in your column statements. Also, you don't need to define the prov_tin variable since you haven't included it in your desired output . . . see changes below . . .

proc report . . . more of your code . . .;

column ('Cardiac Metric Component' table)

('Calculation by Place of Service and Procedure' location )

, procedure fakevar;

  define table / group ' ' order=formatted;

  define location / across ' ' order=formatted;

  define procedure / across ' ' style(column)={just=r};

  define fakevar/ computed noprint;

  compute fakevar;

    fakevar=1;

  endcomp;

  run;

The spanned headings will probably create undesirable looking blank cells. You can eliminate those using style options. Some examples here: http://support.sas.com/resources/papers/proceedings11/246-2011.pdf

View solution in original post


All Replies
Solution
‎08-08-2013 09:45 PM
Super Contributor
Posts: 307

Re: proc format report not quite right

Just a few things need to be changed in your column statements. Also, you don't need to define the prov_tin variable since you haven't included it in your desired output . . . see changes below . . .

proc report . . . more of your code . . .;

column ('Cardiac Metric Component' table)

('Calculation by Place of Service and Procedure' location )

, procedure fakevar;

  define table / group ' ' order=formatted;

  define location / across ' ' order=formatted;

  define procedure / across ' ' style(column)={just=r};

  define fakevar/ computed noprint;

  compute fakevar;

    fakevar=1;

  endcomp;

  run;

The spanned headings will probably create undesirable looking blank cells. You can eliminate those using style options. Some examples here: http://support.sas.com/resources/papers/proceedings11/246-2011.pdf

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 154 views
  • 0 likes
  • 2 in conversation