Dear Statalist
Many thanks in advance for your help. I am stuck in a situation where I need to calculate hospital readmissions and check if they are for the same reason. I was able to calculate the re-admissions using, "by id (admission_date), sort: gen is_readmission_90 = admission_date-admission_date[_n-1] <=90". However, I cannot calculate if these were for the same reason. For the reasons, I have a string variable with codes like"S799", "H358", etc. So, for all the readmissions with a timeframe, I need to check how many were for the same reason. Can you please help?
Many thanks and regards
Vishal
Many thanks in advance for your help. I am stuck in a situation where I need to calculate hospital readmissions and check if they are for the same reason. I was able to calculate the re-admissions using, "by id (admission_date), sort: gen is_readmission_90 = admission_date-admission_date[_n-1] <=90". However, I cannot calculate if these were for the same reason. For the reasons, I have a string variable with codes like"S799", "H358", etc. So, for all the readmissions with a timeframe, I need to check how many were for the same reason. Can you please help?
Many thanks and regards
Vishal
Comment