It's extremely easy to forge prescriptions. At the same time, a nationwide system of keeping track of prescriptions online would invade privacy and be extremely costly.
In this scheme, the government would maintain a server that would require each doctor to upload a public key generated from their
private key (and perhaps provide an application doctors can download and run to generate prescriptions).
Whenever the doctor writes a prescription, he would digitally "sign" the prescription before printing it out.
The pharmacist would simply log on to the web site and authenticate the prescription before filling it. (This could be done by scanning the prescription, or by only verifying that it was generated by the correct doctor on the date and time specified).
Note that this is NOT a scheme for putting the entire pharmacy system online, or having the government approve every prescription filled. This simply authenticates that someone with authority to write the prescription has written it--the central web site does not ever have to know what the prescription contained.