omoponfhir / omoponfhir-omopv5-sql

OMOPonFHIR Database SQLRender Implementation
Apache License 2.0
4 stars 3 forks source link

SQL contains reference to column that does not exist. #14

Open rdingwell opened 2 years ago

rdingwell commented 2 years ago

The ConceptServiceImp class contains some embedded sql that contains a reference to a column that does not exist. Specifically, there is a join on table concept that references a column called id. This does not exist in the ddls that are used to construct the schema. I am assuming that this is supposed to be _conceptid . So in the link to the line highlighted below instead of "JOIN concept tar on cr.concept_id_2 = tar.id " this should be "JOIN concept tar on cr.concept_id_2 = tar.concept_d "

https://github.com/omoponfhir/omoponfhir-omopv5-sql/blob/6e0034daeb219b07d6e26b98abfe77f6428fdd25/src/main/java/edu/gatech/chai/omopv5/dba/service/ConceptServiceImp.java#L71

myungchoi commented 6 months ago

This is join SQL between concept and concept_relationship. In concept_relationship, there are columns called concept_id_1 and concept_id_2. This particular SQL is to get ingredient of drug.