Skip to content

AssertVocabDomain

mapping category: assertion no `||`

Fails the record unless the input concept id belongs to a named OMOP vocabulary domain.

Takes a domain name and the input concept id. The rule fails the record unless the concept id is in the named OMOP CDM vocabulary domain. Setting the second parameter to TRUE allows the special concept id 0.

Parameters

1domain Mandatory — accepts: STRING

The name of the OMOP CDM domain the input concept must belong to.

2allowZero Mandatory — accepts: BOOLEAN

When TRUE, the concept id 0 is accepted. When FALSE, 0 causes the assertion to fail.

3comment Optional — accepts: STRING

A comment written to the log when the assertion does not match.

Input type

  • INT

Output type

  • same-as-input

Examples

Concept must be in the Condition domain (0 allowed)

AssertVocabDomain("Condition", TRUE)

Concept must be Procedure with custom failure message

AssertVocabDomain("Procedure", FALSE, "Must be Procedure")

See also

Assert, AssertNot, VocabMap, VocabSourceId