Skip to content

GetEnvironmentValue

aggregating category: cdm-helpers no `||` resultSize: 1

Reads a value from the engine's environment database and returns it as a STRING.

GetEnvironmentValue("KEY") looks up a key in the engine's environment database and emits the associated value. The lookup happens once, at rule construction time, and the result is cached for the lifetime of the rule, so it has no per-row cost.

Use this for static configuration values that should be sourced from the engine's environment (e.g. default concept ids set per deployment) rather than baked into the DSL.

Parameters

1key Mandatory — accepts: STRING

The environment-database key to look up.

Input type

Output type

  • STRING

Requires

  • The key must exist in the engine's environment database.

Examples

Static gender concept id (test007)

GetEnvironmentValue("GENDER_CONCEPT")

Use a deployment-specific provider source

GetEnvironmentValue("EHR")

Errors

  • The environment key: 'KEY' wasn't found
    The named key is not registered in the engine's environment database.
  • GetEnvironmentValue accepts exactly one string parameter
    Wrong arity or non-string parameter.
  • `GetEnvironmentValue' does not support multi-sized results
    The rule was used with a [] or [N] suffix.

See also

SetValue, GetCDMTableId, GetCDMVisitId