It's redundancy. Yes, the doctor will check all this prior to prescription, but doctors can and will make mistakes. Having a secondary layer checking as well is going to save a whole lot of lives.
Do you have any numbers to back up the "is going to save a whole lot of lives"? Granted, Ukraine's healthcare system has never been something to write home about, but I don't remember inability of random pharmacy clerk to see your whole healthcare history to cause much trouble. I wonder how this is handled in EU countries.