Mortality prediction has a role to play in the development of a descriptive measure of the quality of care that provides a fair and equitable means of comparing and evaluating hospitals. This article describes a study of a medical text analysis algorithm for mortality prediction that used big data in the form of unstructured medical notes. The article describes the concept of using text mining technology for medical systems, a method for preprocessing medical data to predict patient mortality, an algorithm for predicting patient deaths based on the logistic regression classifier and presents a software module for implementing the proposed algorithm.