4D printing for diagnostic devices