Upsert treatmen