; (iv) the officer or employee of an element of the intelligence community carrying out the query has a reasonable belief that an emergency exists involving an imminent threat of death or serious bodily harm, and that in order to prevent or mitigate such threat, the query must be conducted before a court order can, with due diligence, be obtained, provided that any covered data accessed through such query is used only for such purpose; or (v) such covered person or, if such person is incapable of providing consent, a third party legally authorized to consent on behalf of the person has consented to the query, provided that any use of covered data accessed through such query is limited to the purposes for which the consent was provided. (C) Special rule for nonsegregable datasets For a query of a dataset acquired under subsection (b)(7)— (i) each query shall be reasonably designed to exclude personal data of covered persons, unless the query is subject to an exception set forth in paragraph (4)