updated the way patient_historical_outcomes are being exported