I would like to have data that does not have transfers in it and compute length of stay and other times. I want to create a transfer sequence variable for that.
I have dat that has with in hospital transfer which I want to merge the duration (overlapping and serial transfers) and have one date of admission and date of discharge instead. I also want to remove nested transfers from the data as they can be cases going to different units in the hospital but reported as separate cases. Are there commands around?
ID | date of admission | date of discharge |
1 | 30-Jan-13 | 10-Feb-13 |
1 | 3-Feb-13 | 6-Feb-13 |
2 | 14-Jan-14 | 15-Jan-14 |
2 | 15-Jan-14 | 5-Feb-14 |
3 | 17-Sep-15 | 20-Sep-15 |
3 | 18-Sep-15 | 23-Sep-15 |
Patient 2 has serial transfer and I want to merge with previous admission, with the new dates being 14-Jan-14(date of admission) to 5-Feb-14 (new date of discharge)
Patient 3 has overlapping transfer and I want to merge with previous admission, with new dates being 17-Sep-15 (date of admission) to 23-Sep-2015(date of discharge)
Appreciate any help with this.
0 Response to Serial, overlapping and nested hospital transfers
Post a Comment