Introducing smart affordable miniaturized biocompatible medical devices that possess diagnostic, prognostic and therapeutic functionalities