just what the doctor ordered

Just what the doctor ordered is a very common idiom to mean that this is exactly what is required, and is usually in reference to something which will improve your health or comfort. Something that is just what the doctor ordered in the literal sense in something which would keep you well and healthy or help you feel better. Figuratively, the phrase means virtually the same thing where it is an item to help you heal or make you feel more comfortable.