Deputy who was shot and injured released from hospital