BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
tmcrouse
Calcite | Level 5

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Fugue
Quartz | Level 8

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

1 REPLY 1
Fugue
Quartz | Level 8

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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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