An embodiment relates to a transdermal drug delivery system comprising a patch comprising a) a cartridge comprising a drug; b) a bio-sensor and a non bio-sensor; c) an active delivery pad comprising an electrode for delivery of the drug into a tissue via iontophoresis; d) a power source of electrical energy connected to the electrode; e) a microcontroller configured to control a release of the drug wherein the patch is attached to the tissue via an adhesive pad, and optionally top of patch is covered with a sheet; wherein the bio-sensor is configured to detect a physiological parameter; wherein the non bio-sensor is configured with a software to control working of the patch.