Sanskrit manuscripts of the sutra no later than the seventh century have been recovered at Gilgit and Bamiyan, both in the old Buddhist territory of Gandhara, which places the text firmly in Indian Buddhism and answers an older suspicion that it was a Chinese composition. Several Chinese translations were made, and the one that carried the cult was Xuanzang's of 650 CE, done shortly after his return from India.
From China the cult went everywhere Chinese Buddhism went. In Japan Yakushi was the object of imperial devotion from the seventh century and the Yakushi-ji at Nara was founded for the recovery of an empress; in Tibet Sangye Menla heads a lineage of medical practice in which the sutra is recited over patients and its mantra used in the preparation of medicines. The Medicine Buddha mantra, which ends bhaishajye bhaishajye bhaishajya-samudgate svaha, comes from this text.
The sutra is candid that the healing it promises is not only physical. It is addressed to fear, to the circumstances of a bad death, and to the disorder of a society in which people are imprisoned unjustly and go hungry. Reading it purely as a magical remedy misses most of what it says, and reading it purely as metaphor misses the fact that it was, and is, recited over actual sick people.