I want to count the number of times the "Name" appears after the first Admission_Date and Discharge_Date.
For "B", the first Admission_Date is 18857, and Discharge_date is 19920. So I want to see how many times the Name "B" appears after 19920 Discharge_Date. As in for "B" we would have ZERO as all the Admission Dates are less than the first Discharege_date.
I would really appreciate any help regarding this. Thank you.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str15 ID strL Name double(Admission_Date Discharge_Date) "2" "B" 18857 19920 "2" "B" 18873 20150 "2" "B" 18907 18996 "2" "B" 18931 20685 "2" "B" 18947 19493 "2" "B" 18980 19192 "2" "B" 18984 20101 "2" "B" 18984 19350 "3" "C" 18645 19435 "3" "C" 18651 18651 "3" "C" 18656 19589 "3" "C" 18660 19681 "3" "C" 18680 19554 "3" "C" 18756 20301 "3" "C" 18815 19796 "3" "C" 18835 19625 "3" "C" 18858 19404 "3" "C" 18869 18869 "3" "C" 18884 19625 "3" "C" 18913 19587 "3" "C" 18924 19250 "3" "C" 18960 19508 "3" "C" 18963 19778 "3" "C" 18985 19032 "4" "D" 18847 18859 "4" "D" 18849 18873 "4" "D" 18861 18884 "4" "D" 18865 18869 "4" "D" 18868 19250 "4" "D" 18873 18884 "4" "D" 18878 18884 "4" "D" 18892 18914 "4" "D" 18892 18914 "4" "D" 18896 18950 "4" "D" 18920 18928 "5" "E" 18655 20338 "5" "E" 18794 19170 "5" "E" 18885 20297 "5" "E" 18894 19429 "5" "E" 18978 18978 "5" "E" 18989 20188 end format %td Admission_Date format %td Discharge_Date
0 Response to Frequency of Patient's Visits after First Discharge Date
Post a Comment