BookmarkSubscribeRSS Feed
CathyVI
Lapis Lazuli | Level 10

Hello, 

I know this might seems very simple to some.

1. How do I generate a report on proportion of patients with any physician visit. 

2. How do I report the distribution of the number of physician visits per patient.

There are multiple records per patient

Here is my dummy data

data want;

set have;

input patientid phyvisit$;

datalines;

10  xyz

10  abc

10  ijk

11 abc

11 edc

12 abc

12 adc

12 zxc

;

run;

Thanks

 

2 REPLIES 2
ballardw
Super User

What is the report supposed to look like?

 

When you say proportion there should be some sort of numerator and denominator involved. What are they? Count of Patients? Count of Doctors? Count of Visits? Count of unique patients (each patient only counted one time)?

CathyVI
Lapis Lazuli | Level 10
Based on the question, its the count of patient, so numerator will be count of patient with any physician visit and denominator will be ALL patient. Any coding idea will be really appreciated.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 653 views
  • 0 likes
  • 2 in conversation