|
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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.