prep_ipd function

Prepare Individual Patient Data