updated the query that pulls a patient with all encounters, orders and observations connected to that patient