Medical rigid boxes with magnetic closure