Case filed in 2022 by patient unable to afford medicine leads to cap on drug prices for millions who face ruin if diagnosed