In any prosecution for a violation of any provision of this chapter, or any rule or regulation of the board made pursuant to this chapter, or in any quarantine proceeding authorized by this chapter, or in any habeas corpus or other proceeding in which the legality of the quarantine is questioned, any physician, health officer, spouse, or other person shall be competent and may be required to testify against any person against whom the prosecution or other proceeding was instituted, and the privileges provided by Sections 970, 971, 980, 994, and 1014 of the Evidence Code are not applicable to or in any such prosecution or proceeding.