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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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