updated code to pull patient information