A federal judge dismissed a challenge by hospital groups to a federal rule requiring them to disclose prices they quietly negotiate with insurers, in a victory for White House efforts to make healthcare pricing more transparent to patients.