Nowadays, medical applications need a lot of storage for storing and providing access to the medical information seekers. Moreover in medical applications, information grows tremendously and hence they must be stored using a suitable storage structure so that it is possible to retrieve them faster from the text corpus in which the medical information is stored. The existing methods for storage and retrieval do not focus on classified organization. However, classified data storage will facilitate fast retrieval. Therefore, a new Latent Dirichlet Allocation (LDA) based topic modeling approach is proposed in this paper which uses temporal rules for effective manipulation of stored data. Therefore, a temporal rule based classification algorithm is proposed in this work by combining Naïve Bayes Classifier with LDA and temporal rules to store the data more efficiently and it helps to retrieve the documents faster. From the experiments conducted in this work by storing and retrieving medical data in a corpus, it is proved that the proposed model is more efficient with respect to classification accuracy leading to organized storage and fast retrieval. © Springer Nature Singapore Pte Ltd. 2019.