Automatically Creating a Dependent Variable

Brim allows you to automatically generate dependent variables and their full supporting variable hierarchy using AI.


Instead of manually creating every input variable, you can describe your outcome or calculation once, and Brim will generate:


  • The dependent variable
  • Supporting input variables
  • Logical relationships between variables
  • Conditional requirements
  • A structured hierarchy ready for abstraction

This guide walks through how to generate, review, optimize, and finalize a dependent variable hierarchy.

When to Use Hierarchical Dependent Variable Generation

Use this workflow when your dependent variable:

  • Requires multiple clinical conditions
  • Depends on intermediate variables
  • Represents eligibility criteria, scores, or outcomes
  • Has logical rules (AND / OR conditions)
  • Would otherwise require creating many variables manually

Examples include:

  • Clinical trial eligibility
  • Diagnostic criteria
  • Quality metrics
  • Composite outcomes
  • Clinical scoring systems

You'll find a step by step guide below:

What should I use for Name?

The name should be clear and descriptive.

✅ Good examples:

  • Severe Sepsis Criteria Met
  • SLE Trial 24567 Eligibility
  • Post-Operative Complication Present

Avoid vague names like Score, Status, and Result


What should I use for Description?

Enter a description explaining how the value should be determined.


This description guides Brim’s hierarchy generation.


You may include:

  • Clinical definitions
  • Required events
  • Timing requirements
  • Threshold values
  • Calculation logic

Example:

True if within 3 hours of admission:
- Measure initial lactate level.
- Draw blood cultures prior to antibiotics.
- Administer antibiotics

More detail generally produces stronger generated hierarchies.


Review the Generated Hierarchy

After hierarchy generation, you’ll see:

  • The dependent variable at the top
  • A structured hierarchy beneath it
  • Logic describing how variables combine

Carefully confirm that the hierarchy reflects your intended definition, looking for:

  • Whether everything you described in your name and description is included
  • If the set of variables and their relative positioning make sense.

If you would like to change the hierarchy, click "Optimize Hierarchy" and provide feedback describing what should change in your hierarchy.


This allows rapid iteration without manual rebuilding.

Review Generated Variables

Once satisfied, Click Approve Hierarchy and Generate Variables


Brim converts the hierarchy into fully defined variables.

We recommend expanding component variables and modifying them as appropriate to fit your logic. Pay special attention to:

  • Variable types and scopes
  • Variable conditions (which constrain which notes are considered during generation)
  • Completeness and correctness of instruction.

After you're satisfied, click "Save All Variables" to save.


Best Practices

  • Trust, but Verify. The DV Hierarchy Generator is smart, but its not a mind reader. Make sure the variable hierarchy and component variable definitions look like what you'd expect, or iterate/edit until they do.
  • Validate your Variables with real data. The best way to judge the quality of a variable or dependent variable is with real data.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.