In this paper we present a simple and scalable method to process long text with the existing transformer models such as bert.we show that this method significantly improves the previous results reported for transformer models in automated icd coding, and is able to outperform one of the prominent cnn-based methods.