|
can you also please show how your output looks like for a particular scenario.
I added a few rows to show when there is a type b within 90 days of another and how then the type a would not count and type be would be marked as bad.
I'm not even for sure but I think this would do it. I will need to be able to calculate what is the average number of a's for each good b event and also what is the total good type a's.
ID | Claim_ID | Claim_line | Date | Type | Type_b_good | typeb_number | in_90_good |
1 | 1 | 1 | 11-Feb | a | . | . | 1 |
1 | 2 | 1 | 11-Mar | b | 1 | 1 | 0 |
1 | 2 | 2 | 11-Mar | b | 0 | 2 | 0 |
1 | 2 | 3 | 11-Mar | a | . | . | 1 |
1 | 3 | 1 | 11-Jun | b | 1 | 3 | 0 |
1 | 3 | 2 | 11-Jun | a | . | . | 0 |
1 | 3 | 3 | 11-Jun | a | . | . | 0 |
1 | 4 | 1 | 3-Jul | a | . | . | 0 |
1 | 5 | 1 | 6-Jul | a | . | . | 0 |
1 | 6 | 1 | 9-Sep | b | 1 | 4 | 0 |
2 | 1 | 1 | 8-Aug | a | . | . | 1 |
2 | 2 | 1 | 10-Sep | b | . | 1 | 0 |
2 | 3 | 1 | 30-Nov | a | . | . | 1 |
2 | 4 | 1 | 11-Dec | b | 1 | 2 | 0 |
2 | 5 | 1 | 12-Dec | a | . | . | 0 |
2 | 6 | 1 | 13-Dec | b | 0 | 3 | 0 |
Search using either Google or the Forum: "30 day readmission"
There are several methods that can be implemened - usually using SQL processing.
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.
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.