Any licensed physician and surgeon, or other person engaged in attendance upon a pregnant woman or a recently delivered woman, or any representative of a laboratory who violates any provision of this chapter, is guilty of a misdemeanor. However, a licensed physician and surgeon, or other person engaged in attendance upon a pregnant or recently delivered woman, whose request for a specimen is refused, is not guilty of a misdemeanor for failure to obtain it.