I have Data#1 with 3 visit dates (dates intervention administrated) and Data#2 which is reported adverse event dates. I wanted to relate which intervention is related to a given adverse event so want to join the two data sets by date. Can you please lead me how to do this?
Data #2
Data#1 | |||
ID | visit date1 | visit date2 | visit date3 |
1 | 20-Nov-21 | 18-Dec-21 | 14-Jan-22 |
2 | 20-Nov-21 | 18-Dec-21 | 14-Jan-22 |
5 | 20-Nov-21 | 18-Dec-21 | 14-Jan-22 |
7 | 20-Nov-21 | 18-Dec-21 | 14-Jan-22 |
8 | 20-Nov-21 | 18-Dec-21 | 14-Jan-22 |
9 | 20-Nov-21 | 18-Dec-21 | 14-Jan-22 |
10 | 4-Dec-21 | 1-Jan-22 | 29-Jan-22 |
13 | 4-Dec-21 | 1-Jan-22 | 29-Jan-22 |
14 | 4-Dec-21 | 1-Jan-22 | 29-Jan-22 |
15 | 4-Dec-21 | 1-Jan-22 | 29-Jan-22 |
16 | 4-Dec-21 | 1-Jan-22 | 29-Jan-22 |
17 | 18-Dec-21 | 15-Jan-22 | 12-Feb-22 |
19 | 4-Dec-21 | 1-Jan-22 | 29-Jan-22 |
20 | 6-Jan-22 | 3-Feb-22 | 3-Mar-22 |
24 | 18-Dec-21 | 15-Jan-22 | 12-Feb-22 |
25 | 18-Dec-21 | 15-Jan-22 | 12-Feb-22 |
26 | 18-Dec-21 | 15-Jan-22 | 12-Feb-22 |
27 | 18-Dec-21 | 15-Jan-22 | 12-Feb-22 |
29 | 18-Dec-21 | 15-Jan-22 | 12-Feb-22 |
30 | 18-Dec-21 | 15-Jan-22 | 12-Feb-22 |
32 | 6-Jan-22 | 3-Feb-22 | 3-Mar-22 |
AdverseEvent# | ID | vdate |
101 | 1 | 28-Jan-22 |
102 | 1 | 8-Mar-22 |
103 | 1 | 26-Jul-22 |
104 | 1 | 26-Jul-22 |
105 | 1 | 9-Oct-22 |
106 | 2 | 23-Nov-21 |
107 | 2 | 19-Dec-21 |
108 | 2 | 18-Dec-21 |
109 | 2 | 14-Jan-22 |
110 | 2 | 8-Aug-22 |
111 | 2 | 8-Aug-22 |
112 | 2 | 7-Nov-22 |
113 | 5 | 19-Dec-21 |
114 | 5 | 14-Jan-22 |
115 | 5 | 1-Jul-22 |
116 | 5 | 10-Aug-22 |
117 | 5 | 3-Sep-22 |
118 | 7 | 19-Dec-21 |
119 | 7 | 14-Jan-22 |
120 | 7 | 20-Nov-21 |
121 | 7 | 10-Apr-22 |
122 | 7 | 29-Oct-21 |
123 | 7 | 18-Aug-22 |
124 | 7 | 18-Aug-22 |
125 | 7 | 13-Oct-22 |
126 | 8 | 21-Nov-21 |
127 | 8 | 19-Dec-21 |
128 | 8 | 21-Dec-21 |
129 | 8 | 15-Jan-22 |
130 | 8 | 21-Dec-21 |
131 | 8 | 20-Apr-22 |
132 | 8 | 13-Oct-22 |
133 | 8 | 11-Jul-22 |
134 | 9 | 18-Dec-21 |
135 | 9 | 18-Dec-21 |
136 | 9 | 5-Jan-22 |
137 | 9 | 10-Jan-22 |
138 | 9 | 27-Oct-21 |
139 | 9 | 26-Oct-22 |
140 | 10 | 5-Dec-21 |
141 | 10 | 2-Jan-22 |
142 | 10 | 30-Jan-22 |
143 | 10 | 24-Oct-22 |
144 | 13 | 1-Jan-22 |
145 | 14 | 5-Dec-21 |
146 | 14 | 2-Jan-22 |
147 | 14 | 12-Feb-22 |
148 | 15 | 1-Jan-22 |
149 | 15 | 2-Jan-22 |
150 | 15 | 1-Jan-22 |
151 | 15 | 1-Jan-22 |
152 | 15 | 27-Jan-22 |
153 | 15 | 29-Jan-22 |
154 | 15 | 7-Sep-22 |
155 | 15 | 10-Sep-22 |
156 | 16 | 4-Dec-21 |
157 | 16 | 14-Jan-22 |
158 | 16 | 14-Feb-22 |
159 | 16 | 26-Mar-22 |
160 | 16 | 19-Apr-22 |
161 | 16 | 24-Sep-22 |
162 | 16 | 14-Nov-22 |
163 | 17 | 9-Apr-22 |
164 | 17 | 17-Sep-22 |
165 | 19 | 5-Dec-21 |
166 | 19 | 5-Dec-21 |
167 | 19 | 4-Jan-22 |
168 | 19 | 29-Jan-22 |
169 | 19 | 4-Jan-22 |
170 | 19 | 20-Aug-22 |
171 | 20 | 10-Jan-22 |
172 | 20 | 18-Jan-22 |
173 | 20 | 4-Feb-22 |
174 | 20 | 6-Mar-22 |
175 | 24 | 21-Dec-21 |
176 | 24 | 27-Nov-21 |
177 | 25 | 19-Feb-22 |
178 | 26 | 16-Jan-22 |
179 | 26 | 26-Feb-22 |
180 | 26 | 18-Aug-22 |
181 | 27 | 16-Jan-22 |
182 | 27 | 16-Jan-22 |
183 | 27 | 13-Feb-22 |
184 | 27 | 19-Mar-22 |
185 | 27 | 19-Mar-22 |
186 | 27 | 12-Aug-22 |
187 | 29 | 25-Feb-22 |
188 | 29 | 17-Oct-22 |
189 | 30 | 19-Dec-21 |
190 | 30 | 16-Jan-22 |
191 | 30 | 16-Jan-22 |
192 | 30 | 16-Jan-22 |
193 | 30 | 15-Jan-22 |
194 | 30 | 18-Jan-22 |
195 | 30 | 1-Feb-22 |
196 | 30 | 13-Feb-22 |
197 | 30 | 12-Feb-22 |
198 | 30 | 18-Jul-22 |
199 | 30 | 1-Oct-22 |
200 | 32 | 3-Mar-22 |
201 | 32 | 25-Jul-22 |
202 | 32 | 13-Oct-22 |
203 | 32 | 13-Oct-22 |