The state or any entity required to perform duties under this subchapter shall be immune from civil liability for performing the duties required under this subchapter.