A smart indwelling needle with on-demand switchable anticoagulant and hemostatic activities