PEDSnet / Data-Quality-Analysis

The PEDSnet Data Quality Assessment Toolkit (OMOP CDM)
BSD 2-Clause "Simplified" License
24 stars 7 forks source link

revise the datetime check using dplyr/lubridate etc #281

Closed writetoritu closed 6 years ago

writetoritu commented 6 years ago

thanks @janetzahner for finding this bug.

writetoritu commented 6 years ago

mismatch_date_tbl <- cdm_tbl(req_env$db_src, table_name) %>% select(date_field, time_field) %>% mutate(time_field_as_date = sql('cast(time_field as date)')) %>% filter(date_field<>time_field_as_date) %>% collect()