Medical devices having a barrier layer comprising an inorganic material. The medical device has a reservoir containing a therapeutic agent and the barrier layer is disposed over the reservoir. In one aspect, the barrier layer has one permeability to the therapeutic agent at one portion of the medical device and a different permeability at another portion of the medical device. In another aspect, the dosage amount of the therapeutic agent in the reservoir at one portion of the medical device is different from the dosage amount of the therapeutic agent in the reservoir at another portion of the medical device. In another aspect, a bioresorbable layer is disposed over the barrier layer at one or more portions of the medical device, wherein the bioresorbable layer comprises a bioresorbable material. Also, methods of coating a medical device are disclosed, in which a barrier layer over a medical device is formed using a lithographic etching process where a plurality of particles serve as an etch mask.