diff --git a/query-connector/flyway/sql/V01_06__add_dibbsConceptType.sql b/query-connector/flyway/sql/V01_06__add_dibbsConceptType.sql new file mode 100644 index 000000000..2c123b5ae --- /dev/null +++ b/query-connector/flyway/sql/V01_06__add_dibbsConceptType.sql @@ -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; \ No newline at end of file