tidy_locations: Tidy locations

Description Usage Arguments Details Value

Description

tidy_locations tidy hospital location data

Usage

1
tidy_locations(raw.data)

Arguments

raw.data

A data frame with location data

Details

This function takes a data frame with hospital location history and produces a tidy version with unit arrival and departure data. It accounts for incorrect departure time from raw EDW data by calculating the departure time using the arrival time of the next unit (unless it was the patient's last unit during the hospitalization). It also combines multiple rows of data when the patient did not actually leave that unit. The data should be read in by read_edw_data.

Value

A data frame


bgulbis/BGTools documentation built on May 12, 2019, 8:21 p.m.