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

Modify the check: The number and percent of records with a value in the OBSERVATION_PERIOD_START_DATE field of the OBSERVATION_PERIOD that occurs prior to the date in the BIRTH_DATETIME field of the PERSON table. #513

Closed
dimshitc opened this issue Dec 1, 2023 · 2 comments · Fixed by #516
Assignees
Labels
check bug/enhancement DQ check SQL logic has a bug or needs refinement

Comments

@dimshitc
Copy link
Collaborator

dimshitc commented Dec 1, 2023

Need to modify the check. Currently if the only year of birth is given, it uses CAST(CONCAT(plausibleTable.year_of_birth,'-06-01') AS DATE. But the real date of birth can be easily in the beginning of the year, leading to observation period start at this date.

@dimshitc dimshitc self-assigned this Dec 1, 2023
@dimshitc dimshitc changed the title The number and percent of records with a value in the OBSERVATION_PERIOD_START_DATE field of the OBSERVATION_PERIOD that occurs prior to the date in the BIRTH_DATETIME field of the PERSON table. Modify the check: The number and percent of records with a value in the OBSERVATION_PERIOD_START_DATE field of the OBSERVATION_PERIOD that occurs prior to the date in the BIRTH_DATETIME field of the PERSON table. Dec 1, 2023
@katy-sadowski
Copy link
Collaborator

@MaximMoinat raised this issue as well! Check his proposed solution here: #445 (comment). Agree this should be fixed.

@katy-sadowski katy-sadowski added the check bug/enhancement DQ check SQL logic has a bug or needs refinement label Dec 2, 2023
@MaximMoinat
Copy link
Collaborator

MaximMoinat commented Dec 7, 2023

Thanks Katy for linking this. I have completed my PR on this, please @dimshitc, could check it out?
#454. (There are still a few conflicts, I will solve these later)

Note that we are changing the behavior of two checks in this way (temporal_after and plausible_during_life). Results will not be comparable anymore with results retrieved before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
check bug/enhancement DQ check SQL logic has a bug or needs refinement
Projects
None yet
3 participants