How to sum the number of patient admissions for a certain time period?

Reply
N/A
Posts: 0

How to sum the number of patient admissions for a certain time period?

I have a dataset containing patient admissions 'numadmit' and their stay period within a facility ('startdate' and 'enddate'). Each patient has a unique 'ID' but may have many records, one for each admission. Each admission has a 'startdate' and 'enddate'. These dates may be the same for multiple admissions.

How do I sum up the number of admissions for a particular patient for a certain period?

For example, I patient 'A' has 3 different 'numadmit' each equal to 1 for that record. The time period 'startdate' to 'enddate' are the same for each of the 3 admissions but this patient also has other entries with different date. How can I sum the number of admissions (in this case the sum would equal 3) for that patient within this period and also sum the number of admissions (this sum would be in a different record for the patient) for the other time period?
Super Contributor
Posts: 578

Re: How to sum the number of patient admissions for a certain time period?

to count admissions for patient x between '01jan2010'd and '31jan2010'd:

proc sql;
select count(*) as Admissions
from tabla
where patientid=xxx
and startdate le '31jan2010'd
and enddate ge '01jan2010'd;
quit;


counts any admission that starts or ends during Jan 2011 or encompasses the whole month. Message was edited by: DBailey
Occasional Contributor
Posts: 17

Re: How to sum the number of patient admissions for a certain time period?

If it is detail level data then simply counting rows/summing of numadmit is not actual admissions.

SD
Post a Question
Discussion Stats
  • 2 replies
  • 324 views
  • 0 likes
  • 3 in conversation