; and (BB) the date and location of each scheduled immigration court proceeding of the child; and (bb) is provided with updated information if the location of the child or a scheduled immigration court proceeding of the child changes; and (IV) the location and contact information for the apprehended parent or legal guardian is maintained on file; (V) each child has the opportunity to say goodbye to the apprehended parent or legal guardian prior to separation; and (VI) with respect to the health of the child, the apprehended parent or legal guardian— (aa) can communicate known medical illness and medical history to Department of Homeland Security staff prior to separation; and (bb) is made aware of medical treatment administered to the child while in the care of the Office of Refugee resettlement, including the use of psychotropic drugs; and (iv) ensuring that, with respect to a decision relating to the removal from the United States or referral for prosecution of an apprehended parent or legal guardian— (I) consideration is given to— (aa) the best interests of the child of the apprehended parent or legal guardian; (bb) family unity, to the maximum extent possible; and (cc) any other public interest factor, including a humanitarian concern and a concern relating to the physical safety of the apprehended parent or legal guardian; and (II) the apprehended parent or legal guardian and the child have access to legal counsel; and (H) coordinate with the Consulate of Mexico to ensure the safe repatriation of any child who is a citizen of Mexico. (4) Preservation of confidentiality Each child welfare professional shall maintain the privacy and confidentiality of all information gathered in the course of providing care, custody, placement, and follow-up services to a child pursuant to this subsection, consistent with the best interest of the child, by not disclosing such information to other Federal agencies or nonparental third parties unless such disclosure— (A) is in the best interest of the child; (B) is in writing