An interpretable outcome prediction model based on electronic health records and hierarchical attention