OHDSI Home | Forums | Wiki | Github

Synpuf set up

Hello,

I’m trying to set omoponfhir ompop 5.4 along with synpuf 5.3. I’ve downloaded the vocabularies from Athena, and 1K Synpuf data. I’ve created a postgres database in AWS and am running the script in this order

  1. OmopCDMpostgressql.sql
  2. 1KUploadScript - It copies the tables to Postgres tables
  3. Omop CDM postgresql indexes.sql
  4. Omop CDM postgresql contraints.sql

When I run the constraint sql, I get the below error -

ERROR: Key (observation_concept_id)=(38001226) is not present in table “concept”.insert or update on table “observation” violates foreign key constraint “fpk_observation_concept”

ERROR: insert or update on table “observation” violates foreign key constraint “fpk_observation_concept”
SQL state: 23503
Detail: Key (observation_concept_id)=(38001226) is not present in table “concept”.

I’m not sure why I’m missing the concepts from the observation table, when I further query the observation table for concept IDS missing from the Concept table, I get a total of 538 Concept IDs that are not in the concept table.

Any thoughts on where I can get the missing concepts?

Thanks in advance for your help!

Hi, James –

You are missing some vocabularies. Download a more complete set from Athena.

I’m not sure what the minimum set of vocabularies is needed to support the synpuf ETL. I ran into the same issue and ended up downloading everything I could from Athena.

Another options is to disable the constraints, letting you get mostly up and running before having to solve this issue.

Regards,

Tom

t