expired + hospice < hospital mortality
tableone_df = final_tableone_df.drop_duplicates(subset=['encounter_block'],
keep='last')
| discharge_dttm |
discharge_category |
death_enc |
expired_outcome |
hospice_outcome |
tableone_df |
| 2024-07-10 |
hospice |
1 |
0 |
1 |
FALSE |
| 2024-07-10 |
hospice |
1 |
0 |
1 |
FALSE |
| 2024-07-18 |
skilled nursing facility (snf) |
1 |
0 |
0 |
TRUE |
| 2024-07-18 |
skilled nursing facility (snf) |
1 |
0 |
0 |
TRUE |