HI, I'm currently bothered by a task. For the following dataset containing ID and birthday to confirm unique information for each subject. I have to check the actually first bleeding date for each patient, which was defined by 1) bleedingday-14<= gastroscopyday <=bleedingday+14 and 2) bleedingday<=gidrugday<=bleedingday+30. For instance, the first bleeding date of ID 7000XXXXX should be recognized as Day 15292. Can anyone give me some hints to work on or any codes to fix it? thanks! DATA CASE ; INPUT ID $ birthday1 $ gi_bleedingday gastroscopyday gidrugday ; CARDS; 7000082662380a 196202 . . 15327 7000082662380a 196202 . 18673 . 7000082662380a 196202 . 18674 . 7000082662380a 196202 15068 . . 7000082662380a 196202 15069 . . 7000082662380a 196202 15069 15069 . 7000082662380a 196202 15076 . . 7000082662380a 196202 15110 . . 7000082662380a 196202 15124 . . 7000082662380a 196202 15292 . . 7000082662380a 196202 15299 . . 7000082662380a 196202 15305 . . 7000082662380a 196202 15305 15305 . 7000082662380a 196202 15313 . . 7000082662380a 196202 15313 . 15313 7000082662380a 196202 15347 . . 7000082662380a 196202 16007 . . 7000082662380a 196202 16007 16007 . ; run;
... View more