Added trigger to update the number of visits in the patient table and rearranged the data script.