Code: Select all
*Admission number. sort cases by patient_id fromdate. compute admission_no = 1. if $casenum ne 1 and patient_id = lag(patient_id) admission_no = lag(admission_no) + 1. exe. *Lenght of stay. compute length_of_stay = datediff(throughdate,fromdate,"days") + 1. exe. desc length_of_stay.
Users browsing this forum: No registered users and 1 guest