1. A system for operation of a medical device for therapeutics, comprising: a therapeutic module consisting of at least two layers; an analytical module consisting of a system-on-a-chip (SoC); a set of compartments for storage of chemicals and biologicals; a set of electrical interconnects; a set of microfluidic components, including tubes, valves and gates; at least one integrated circuit; wherein the layers of components are connected by the electrical interconnects; wherein the process is controlled by the integrated circuit; wherein the analytical module uses the SoC to model solutions to pathology optimization problems and transfers the data to the therapeutic module; wherein the medical device components include a set of compartments for combining chemicals and biologicals on at least one of a set of layers; wherein the medical device compartments are capable of transforming their configurations; wherein the medical device components are activated after obtaining data from a medical device model for therapeutic recommendations; wherein the medical device components on one layer transform their configuration by folding gates down to remove partitions and folding gates up to add partitions to create newly configured compartments; wherein the medical device flushes fluids from its compartments before the transformation process is initiated; wherein the medical device places chemicals and biologicals into the newly configured compartments on one layer of the device; wherein the medical device components are coordinated to release specific chemicals and biologicals from newly configured compartments on at least one of a set of layers through the microfluidic components in specific measured doses according to the model recommendations; wherein the chemicals and biologicals are combined in a chamber of the medical device module in one of a set of layers; wherein the resulting therapeutic combination is transmitted to a cell site in a patient; wherein the feedback is obtained about the remedy and the analytical module updates the model and sends solution options to the pathology to the therapeutic module; wherein the therapeutic module reconfigures to solve the pathology and combines a new set of chemicals and biologicals according to the revised model in a chamber on one of its layers; and wherein the resulting revised therapeutic combination is transmitted to a cell site in a patient until the pathology is solved.