A valve structure of a compounding device, said compounding device being used to compound or combine various fluids from containers (4a, 4b) and consolidate the fluids into a final container and including a plurality of micro containers and macro containers each attached to an ingredient frame, a housing having at least one pump, a transfer set that is selectively connectable to the housing, the valve structure comprising: a valve housing (20ah, 20bh, 20bfh) being in fluid communication with and located immediately underneath a cylindrical shaped port (20a, 20b, 20bf) of a manifold of the transfer set; and a valve (21a, 21b) located within the valve housing (20ah, 20bh, 20bfh), including an inlet (21b1) at a top of the valve (21a, 21b) and an outlet (21b3) at a side wall of the valve (21a, 21b) and configured to open or close a fluid path; wherein the valve (21a, 21b) is rotated by connection to a stepper motor (102a, 102b) via an actuator connection slot (21a4, 21b4) located in a bottom surface of the valve (21a, 21b); wherein, when the valve (21a, 21b) is located in an open position or a semi open position, fluid travels from the inlet (21b 1) down through a center of the valve (21a, 21b) until it passes a gravity wall (21b2) such that the valve (21a, 21b) works with the manifold to form a P-trap structure; wherein the fluid enters the top of the valve (21a, 21b) via the inlet (21b1) along a rotational axis of the valve (21a, 21b) and exits the valve (21a, 21b) at the side of the valve (21a, 21b) through the outlet (21b3) in a direction substantially normal to the rotational axis of the valve (21a, 21b); and wherein the fluid changes direction by approximately 180 degrees after passing the gravity wall (21b2) and moves up over the outlet (21b3) into a fluid channel (24a, 24b) of the manifold. a valve housing (20ah, 20bh, 20bfh) being in fluid communication with and located immediately underneath a cylindrical shaped port (20a, 20b, 20bf) of a manifold of the transfer set; and a valve (21a, 21b) located within the valve housing (20ah, 20bh, 20bfh), including an inlet (21b1) at a top of the valve (21a, 21b) and an outlet (21b3) at a side wall of the valve (21a, 21b) and configured to open or close a fluid path; wherein the valve (21a, 21b) is rotated by connection to a stepper motor (102a, 102b) via an actuator connection slot (21a4, 21b4) located in a bottom surface of the valve (21a, 21b); wherein, when the valve (21a, 21b) is located in an open position or a semi open position, fluid travels from the inlet (21b 1) down through a center of the valve (21a, 21b) until it passes a gravity wall (21b2) such that the valve (21a, 21b) works with the manifold to form a P-trap structure; wherein the fluid enters the top of the valve (21a, 21b) via the inlet (21b1) along a rotational axis of the valve (21a, 21b) and exits the valve (21a, 21b) at the side of the valve (21a, 21b) through the outlet (21b3) in a direction substantially normal to the rotational axis of the valve (21a, 21b); and wherein the fluid changes direction by approximately 180 degrees after passing the gravity wall (21b2) and moves up over the outlet (21b3) into a fluid channel (24a, 24b) of the manifold.