formatting three raw data files into one master file ready for creating of encounter histories