added appointment_id to reports and small js changes