UNMCCC / CRIIS_Source_Extracts_for_OMOP

Cancer Clinical Data integration - Set of SQL extractions from disparate health system sources targeting the OMOP data model
MIT License
0 stars 0 forks source link

(High) Mosaiq.Visit_Occurrence contains duplicate rows #16

Closed isangil closed 2 years ago

isangil commented 2 years ago

Currently the derivatives built for the Mosaiq-to-OMOP CDM lack a proper primary key, since these are just exports. Since these are actually staged in transient DBs, there may be a need for indexing the records, and thus maintain a proper PK. We may adapt several tables to reflect this initiative

KJDonovan-RS21 commented 2 years ago

SELECT COUNT() FROM MQ_VISIT_OCCURRENCE WHERE SOURCE_PK IN ( SELECT SOURCE_PK FROM MQ_VISIT_OCCURRENCE GROUP BY SOURCE_PK HAVING COUNT()>1)

isangil commented 2 years ago

addressed with Max( on modified date)

isangil commented 2 years ago

addressed with #88 (Debbie)