I need to calculate the total hh stay length for patient. below data example is for one patient's record. It includes start date, restart date, discharge date for each episode in three columns, and I needs to get stay length for all episodes. In this example, there are 3 episodes. 15-02-25 to 15-03-13, 15-03-23 to 15-04-07, 15-04-10 to 15-05-11. I'm confused how to deal with the restart_dt and I am struggled to get the total length for each patients in my dataset. Thanks for help if anyone has any ideas.
... View more