Traditional Chinese medicine (TCM) prescription, as an important part of TCM theory, is one of the main manifestation forms and ways of clinical treatment. We need to study oriented efficacy compatibility for treatment based on syndrome differentiation. A prescription is composed of several or a dozen drugs, which efficacies are not simply the composition of all individual effect. In fact, its efficacies are the results of the interactions among drugs inside the prescription. At present, most researches focus on exploiting the frequencies of drugs in prescriptions by utilizing data mining technologies, which cannot catch the interactions among drugs. Therefore, this paper proposes a novel algorithm utilizing sparse representation learning to mine oriented efficacy compatibility in TCM ancient prescriptions, which takes low weight drugs as noise and makes up an oriented efficacy drug group with high weight drugs. We combine the logistics and L1 norm based regularization to mine the oriented efficacy compatibility. Lastly, 14 prescription datasets with different efficacies are used to validate our approach as well as dice index and the average retrieval rate are taken as metrics. Experimental results show that our approach is more effective and accurate than those of the state of the art research.