Previous pneumonia classification algorithms have succeeded in the clinic under closed and static environments. However, in the real world, the emergence of new categories (e.g., COVID-19) and changes in data distribution will cause the existing methods to lose their robustness. In this paper, we formalize this problem as medical open-set domain adaptation under open and dynamic environments. The critical challenge of this problem is to accurately detect the open class samples with subtle differences from the common class. To achieve that, we propose transferable discriminative learning that remarkably achieves robust pneumonia classification with distribution shift and open class emerging. First, we propose the transferable high-density clustering module to detect open class samples and obtain reliable common class samples by considering the density degree. Secondly, we present the transferable triplet loss to enlarge the semantic feature difference between common class and open class samples. Finally, we design the transferable scoring function to detect open class samples effectively. A series of empirical studies show that our algorithm remarkably outperforms state-of-the-art methods. This result demonstrates its potential as a clinical tool for medical open-set domain adaptation.