get_hist function

Obtain histories of treatment or outcome events