Skip to content

Commit

Permalink
omop pg extract coalesce syntax fix
Browse files Browse the repository at this point in the history
closes #194
  • Loading branch information
rtmill committed Mar 16, 2021
1 parent fe720d2 commit f479638
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ExtractScripts/N3C_extract_omop_postgres.sql
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ HAVING COUNT(*) > 1;
SELECT
p.PERSON_ID,
GENDER_CONCEPT_ID,
COALESCE(YEAR_OF_BIRTH,DATEPART(year, birth_datetime )) as YEAR_OF_BIRTH,
COALESCE(MONTH_OF_BIRTH,DATEPART(month, birth_datetime)) as MONTH_OF_BIRTH,
COALESCE(YEAR_OF_BIRTH,DATE_PART('year', birth_datetime )) as YEAR_OF_BIRTH,
COALESCE(MONTH_OF_BIRTH,DATE_PART('month', birth_datetime)) as MONTH_OF_BIRTH,
RACE_CONCEPT_ID,
ETHNICITY_CONCEPT_ID,
LOCATION_ID,
Expand Down

0 comments on commit f479638

Please sign in to comment.