Many hospitals and clinics (i.e. pharmacists working in a physician run clinic) have clinical pharmacists that have the power to prescribe under protocol. That being said, clinical pharmacists are not necessarily diagnosing, because what ends up happening most likely is that a physician diagnoses and then leaves the actual decision of which drug treatment to start the patient on to the pharmacist. Patients who regularly see a clinical pharmacist for management of their meds can have their prescriptions modified (i.e. switch hypertensive drugs if the patient doesn't seem to be responding well to one type) or dosages changed by the pharmacist, again, under protocol. All changes must be logged in the patient's chart and is open for review by the physician.
In the retail setting, in some states, a pharmacist can change a prescription from brand name to generic, or vice versa, depending on what the insurance will cover and what the patient is willing to pay. For example, if the patient really wants brand name but insurance will only pay for generic, the pharmacist can go ahead and give the brand name if the patient is willing to pay it all out of pocket (no co-pay) and this change is of course documented and a record is sent to the physician. Hopefully that's mostly accurate, maybe someone else can fill us in a little more and correct any mistakes I might have written.