Confidentiality laws still apply in court-ordered rehab programs. However, certain information about treatment facilities may be shared with the court to ensure compliance with legal obligations while protecting individuals' privacy.