Hello,
I have a dataset with hospital and emergency data appended together. I also have virus testing data (positive / negative) for influenza virus. I'd like some help identifying a) the first admission for a child that is influenza positive; b) the number of re-admissions in a 14-day period after the discharge date of this first (positive) admission; c) the number of emergency presentations prior to this first admission.
Here is some sample data:
Missing in the influenza column = not tested, which we can treat as 0=negative. 1=positive.
Many thanks for your help.
best wishes
Minda Sarna
I have a dataset with hospital and emergency data appended together. I also have virus testing data (positive / negative) for influenza virus. I'd like some help identifying a) the first admission for a child that is influenza positive; b) the number of re-admissions in a 14-day period after the discharge date of this first (positive) admission; c) the number of emergency presentations prior to this first admission.
Here is some sample data:
child_id | admdate_H | admdate_E | dischargedate | influenza |
1 | 1-Sep-19 | . | 3-Sep-19 | . |
2 | 4-Sep-14 | . | 30-Dec-14 | . |
2 | 10-Feb-15 | . | 10-Feb-15 | . |
2 | 17-Apr-15 | . | 19-Apr-15 | . |
2 | 1-Jun-15 | . | 3-Jun-15 | . |
2 | 3-Aug-15 | . | 5-Aug-15 | . |
2 | 26-Aug-15 | . | 1-Sep-15 | . |
2 | 2-Sep-15 | . | 6-Sep-15 | . |
2 | 12-Oct-15 | . | 13-Oct-15 | . |
2 | 20-Apr-16 | . | 21-Apr-16 | 1 |
2 | 24-Apr-16 | . | 3-May-16 | . |
2 | 2-Feb-17 | . | 7-Feb-17 | . |
2 | 26-Feb-18 | . | 1-Mar-18 | . |
2 | 1-Jul-18 | . | 7-Jul-18 | . |
2 | 25-Sep-19 | . | 27-Sep-19 | 0 |
2 | 2-Aug-21 | . | 2-Aug-21 | . |
2 | 24-Jan-22 | . | 12-Feb-22 | . |
3 | . | 19-Jul-17 | . | . |
3 | . | 20-Jul-17 | . | . |
3 | 21-Jul-17 | . | 22-Jul-17 | . |
3 | 23-Jul-18 | . | 25-Jul-18 | 1 |
3 | 27-Oct-20 | . | 27-Oct-20 | . |
Many thanks for your help.
best wishes
Minda Sarna
Comment