OHDSI / ETL-Synthea

A package supporting the conversion from Synthea CSV to OMOP CDM
https://ohdsi.github.io/ETL-Synthea/
96 stars 70 forks source link

Learnings from using the Synthea data generator for use with ETL-Synthea #45

Closed anthonysena closed 3 years ago

anthonysena commented 5 years ago

I faced a few challenges that I was able to overcome using Synthea which I'll contribute back to the README. For now, I'm adding them to this issue in case others are facing similar issues.

Synthea Setup & Usage

exporter.fhir.export = false
exporter.fhir.transaction_bundle = false
exporter.hospital.fhir.export = false
exporter.practitioner.fhir.export = false
exporter.csv.export = true

I don't think there is any harm in leaving the fhir settings to true except that your producing extra data that you won't use with ETL-Synthea.

Running ETL-Synthea

ablack3 commented 4 years ago

I ran into problems using the ETLSyntheaBuilder::LoadVocabFromCsv() function to load the vocab table. I was able to use the script here

However I ran into a "could not stat file" error when uploading the concept_relationship table which is the largest vocab table. I found a solution at https://stackoverflow.com/questions/53523051/error-could-not-stat-file-xx-csv-unknown-error

I think this is a windows issue. I'm using Windows 10 with postgres 12. The solution was COPY cdm_synthea10.CONCEPT_RELATIONSHIP FROM PROGRAM 'cmd /c "type C:\CDMV5VOCAB\CONCEPT_RELATIONSHIP.csv"' WITH DELIMITER E'\t' CSV HEADER QUOTE E'\b' ;

The ETL seemed to run fine after that!

You can also generate the csv files from synthea using java -jar synthea-with-dependencies.jar --exporter.csv.export true