Skip to content

Commit

Permalink
Add dibbsConceptType to valuesets table (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-goggins authored Oct 18, 2024
1 parent 1712c96 commit 7c7036e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions query-connector/flyway/sql/V01_06__add_dibbsConceptType.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE valuesets
ADD COLUMN dibbsConceptType text GENERATED ALWAYS AS (
CASE
WHEN type IN ('lotc', 'lrtc', 'ostc') THEN 'labs'
WHEN type = 'mrtc' THEN 'medications'
ELSE 'conditions'
END
) STORED;

0 comments on commit 7c7036e

Please sign in to comment.