ropensci-archive / cleanEHR

:warning: ARCHIVED :warning: Essential tools and utility functions to facilitate the data processing pipeline, data cleaning and data analysing of clinical data from CC-HIC
GNU General Public License v3.0
54 stars 23 forks source link

Time bug fix #165

Closed DocEd closed 2 years ago

DocEd commented 6 years ago

This segment of the code caused a problem with allocation of memory. It looks like findMaxTime() was the culprit returning a very high number (possibly the number of hours since 1900??)

This modification works, but may effect legacy ccRecords that were created outside the Postgres pipeline. I'm not very familiar with that aspect, so this needs review in the context of preserving legacy features.

I have removed reference to is.na(tadm) because this field is always present in the new system (A record can't exist without an admission time)

Many thanks in advance for input.

DocEd commented 6 years ago

Not sure. I'll check with Roma a little later on today

klapaukh commented 6 years ago

The failing tests are actually things which are using getEpisodePeriod which you have been modifying. So I think that yes, those failing tests could be relevant.