Merging EventQ and MakingPatients into one working code