OHDSI / ETL-CMS

Workproducts to ETL CMS datasets into OMOP Common Data Model
Apache License 2.0
94 stars 52 forks source link

Updating to newer CDM versions + upload R script available #67

Open schuemie opened 2 years ago

schuemie commented 2 years ago

I wrote an R script for upload the Synpuf data into CDM v5.2.2. There are some new conventions for CDMs that the ETL script doesn't yet follow. My script fixes those, but it would be nicer if they were moved into the ETL script. These are the issues I found:

  1. Per-domain cost tables should be merged in to a single cost table. My script currently just ignores the cost tables
  2. All DATE fields should also get a DATE_TIME field, by just copying the date, and setting time to midnight
  3. The DRUG_EXPOSURE_END_DATE field must be populated. This can simply be done by adding the DAYS_SUPPLY to the DRUG_EXPOSURE_START_DATE.

I guess 1 is harder, but 2 and 3 are pretty trivial.

For even newer versions I think we need to start using the new TYPE_CONCEPT_ID and STATUS_CONCEPT_ID codes and fields.

schuemie commented 2 years ago
  1. populate the CDM_SOURCE table.