updated patient_outcomes script to save exit from care encounters and observations into temporarly files