OHDSI Home | Forums | Wiki | Github

Need help with error trying to import Synthea data into CDM Posgresql local instance


We’re in the process of setting up a local instance of OMOP using Synthea data in Postgresql for reference purposes.

We are currently using the instructions/guidance outlined on the OHDSI/ETL-Synthea github page and the synthea wiki at the links below:

The R script we are running is shown below. It looks like the concept tables load and most of the other tables load but we are getting the errors shown below. The entire script is attached (we renamed to .xml, it’s really a .Rmd file). The entire error report is also attached.

What should we be doing differently?

— ERROR MESSAGE -----------------------
Executing SQL took 0.071 secs
Running: insert_device_exposure.sql
| | 0%Error: Error executing SQL:
org.postgresql.util.PSQLException: ERROR: value
too long for type character varying(50)
An error report has been created at C:/_WORKSPACES/_ECLIPSE_WORKSPACE/workspace/OMOP-Synthia/omop-synthea-etl/errorReportSql.txt
Run rlang::last_error() to see where the error occurred.

SYNTHEA_ETL.Rmd.xml (1.8 KB)

errorReportSql.xml (2.4 KB)

This is an issue with the unique_device_id field being too short. In a recent fixed release this has been changed to 100 characters. The simple solution is to also change the field type to a varchar(100) in your CDM instance.

The new release system discussed during last weeks CDM hackathon should make these type of fixes more explicit and make it easier to get the latest CDM release.

Thanks! Sounds like a good solution, we’ll give it a try and let you know how we make out.

It looks like we have a fix for the column issue. However, it is taking about 2 hours for insert_condition_occurrence.sql to run (we only created 100 patients and there are only about 1k rows in this table when it finishes). Not sure if others are seeing this as well?