Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check plausibleTemporalAfter date format problem #566

Open
dassagichnicht opened this issue Sep 11, 2024 · 1 comment
Open

Check plausibleTemporalAfter date format problem #566

dassagichnicht opened this issue Sep 11, 2024 · 1 comment

Comments

@dassagichnicht
Copy link

In the check "plausibleTemporalAfter" the year of birth is cast to a date by concatenating it with "-06-01". The date format which is used is however "YYYYMMDD". This leads to the error java.sql.SQLDataException: ORA-01843: not a valid month.

This is an example:
CAST(plausibleTable.BIRTH_DATETIME AS DATE), TO_DATE(CONCAT(plausibleTable.year_of_birth,'-06-01'), 'YYYYMMDD')

An easy fix would be to just remove the "-" in the string.

Unfortunately, I wasn't able to find the file in which the check is defined to make sure the problem is not already solved, and I'm just using an old version.

@katy-sadowski
Copy link
Collaborator

Same comment as for the other issue. Please confirm that you are using the latest version of the package.
The source SQL is here and does not contain dashes: https://github.com/OHDSI/DataQualityDashboard/blob/main/inst/sql/sql_server/field_plausible_temporal_after.sql

If you are on the latest DQD version, this may be an issue with SqlRender.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants