Abstract
Exploration of event dates in Sunrise EMR vs NSQIP Registry data. Here we present histograms of event frequencies (fig. 1, fig. 2 ) and timelines (fig. 3, fig. 4) to aid in understanding patterns of discrepancies in admission/discharge dates between the two data sources. The trends discovered so far are summarized in the Conclusions So Far section at the end of this report.
This report is directly generated by a script that can be obtained from https://github.com/bokov/nsqip_emr. The data needs to be obtained separately from the authors though there is a simulated dataset that comes with the git repository.How are the various types of events distributed in time? If there are certain ranges when few events occur, we could trim those off so the analysis can run faster.
Figure 1: Distribution of Events Relative to NSQIP Admission Date. Based on this we can trim off events past as early as 100 days for purposes of similarity clustering– most of the action seems to be within the -60 - 200 day window..
Figure 2: Distribution of Events Relative to NSQIP Admission Date, omitting the most common events (orders).
Figure 3: Patient timelines, grouped by similarity with color/shape coded events superimposed. The events were grouped by patient and the vertical axis was assigned by ranking criteria in the following order: difference between NSQIP admit date and the admit date in Sunrise (CV3ClientVisit|AdmitDt), then difference between the earliest event date of any sort and the NSQIP admit date, then the NSQIP discharge date (NSQIP|DischargeDt), and finally the last event of any sort to be recorded. There are pulse-like patterns where timelines are longer and longer, then reset back to short timelines. These “pulses” are cases that are tied for everything up to and including discharge date, so within each discharge date they are sorted by last event. Bright red points represent cases where the Sunrise admit date does not match the NSQIP admit date. Salmon-colored points represent events (various types of orders) that precede the NSQIP admit date. Orange points are various types of orders that happen after the NSQIP admit date. Purple points represent surgery start (x) and end (+) times. Since this is on the scale of days, they usually coincide so they look like asterisks, but in a few cases they occur on different days, and distinct x and + symbols can be distinguished. Finally, various discharge events (CV3ClientVisit|DischargeDt, cv3Order|DischargeOrder, and NSQIP|DischargeDt) are in various shades of green. The NSQIP one is a solid dot, while the other two are hollow triangles. Therefore, when they coincide there should be dark green triangles with bright green centers. When they do not coincide, the dark green triangles have a color other than green in their centers. Note: the actual NSQIP admission date is not directly plotted here because it exists for every case and in this dataset its value is always 0 (i.e. it cannot deviate from itself).
Figure 4: Same data as fig. 3 but now the time-window narrowed to 30 days before or after NSQIP admission date to better see fine detail.
From fig. 3 several trends can be noticed. It is common for orders to precede admission. It is rare but possible for the Sunrise admit date to deviate from the date recorded in NSQIP in either direction. When the Sunrise date is earlier than NSQIP’s, it almost always comes before any orders. Sunrise discharge-related dates usually agree with NSQIP’s, but when they deviate the Sunrise dates always come later. Surgeries trend closer to admission than discharge. Usually, from admission to discharge there is a dense stream of orders, close to daily, and they usually continue after discharge though with a diminished frequency.