changing how visits are calculated to accomodate many forms with
multiple cases but only one case in common, also adding 12 hour time
cutoff between consecuitive forms in a single visit