PatientLevelPrediction icon indicating copy to clipboard operation
PatientLevelPrediction copied to clipboard

PLP Results Model using Timestamp data type for `execution_date_time`

Open anthonysena opened this issue 1 year ago • 0 comments

The PLP Results Model currently defined the column execution_date_time as a DATETIME2 which is generally translated to a TIMESTAMP data type for most RDBMs (I'm mainly focused on PostgreSQL for the purposes of this issue). For reference, this column is declared for 3 different tables here, here, and here.

I'm currently facing a situation when inserting data into the PLP results data model whereby the insert fails with the error described here: https://github.com/OHDSI/DatabaseConnector/issues/240. I believe this is due to the fact that the execution_date_time captured in the output .csv files only has the date and not the time and so the conversion to a timestamp causes an overflow error.

I'd propose changing this column to a VARCHAR(100) instead to avoid this upload error and perhaps a patch should be put together to add the time portion of the datetime captured for the execution_date_time

anthonysena avatar Aug 11 '23 21:08 anthonysena