N.Y. Civil Practice Law & Rules § 3102
(e) Action pending in another jurisdiction. Except as provided in section three thousand one hundred nineteen of this article, when under any mandate, writ or commission issued out of any court of record in any other state, territory, district or foreign jurisdiction, or whenever upon notice or agreement, it is required to take the testimony of a witness in the state, such witness may be compelled to appear and testify in the same manner and by the same process as may be employed for the purpose of taking testimony in actions pending in the state. The supreme court or a county court shall make any appropriate order in aid of taking such a deposition; provided that no order shall be issued under this section in connection with an out-of-state proceeding relating to any legally protected health activity, as defined in section 570.17 of the criminal procedure law, unless:
(f)