You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ingesting data from some sites we're getting errors when creating the preceding_visit_occurrence_id foreign key constraint.
For example, this postgres error is raised:
insert or update on table "visit_occurrence" violates foreign key constraint "fpk_visit_occurrence_preceding_visit_occurrence_id"
DETAIL: Key (preceding_visit_occurrence_id)=([REDACTED]) is not present in table "visit_occurrence".
In this example, the [REDACTED] key value was greater than 10 million, but the MAX(visit_occurrence_id) was fewer than 5000.
When ingesting data from some sites we're getting errors when creating the
preceding_visit_occurrence_id
foreign key constraint.For example, this postgres error is raised:
In this example, the [REDACTED] key value was greater than 10 million, but the
MAX(visit_occurrence_id)
was fewer than 5000.After looking through the code base I believe that the issue is related to the re-assignment of
visit_occurrence_id
but not thepreceding_visit_occurrence_id
in this script: https://github.com/OHDSI/CureIdRegistry/blob/main/Cohort%20curation%20scripts/05_DE_ID_script.sql#L90The text was updated successfully, but these errors were encountered: