Made it so that a ticket is created right after a patient is created. Also, fixed a few debugging issues