What is a variable?

A variable is the primary communication method in Brim Analytics. You can think of it as similar to a protocol you'd give to a human curator, where you describe what you'd like extracted and the limitations around that abstraction.


A variable in Brim Analytics includes:

  • A name. This name should be descriptive.
  • A scope. This tells Brim how far to look for each label, and what to aggregate values over. The options are:
    • Many Labels Per Note: Generate multiple values in each note.
    • One Label Per Note: There should be at most one value per note generated.
    • One Label Per Patient: There should be at most one value per patient generated.
  • A variable type. This describes the type of data the system should return. The options are:
    • text. No restrictions on format.
    • boolean. The value must be True or False.
    • integer. The value must be a whole integer.
    • float. The value is a number that need not be whole.
  • Instruction. This is the most important part of the variable definition. It describes how to correctly label the variable. A good instruction includes:
    • A clear definition of the variable.
    • Semantics necessary to guide how to abstract values
    • Temporal considerations. Is this historical? Current?
    • One or more examples.
  • Option definitions.
    • If your variable has a limited set of options (for example, "Stage I", "Stage II", and "Stage III"), define them here. Don't forget to include options for unknown or not found.
  • Aggregation strategy. For variables requiring aggregation over a note or the whole patient, this tells Brim how to summarize into one value. You can choose one of the popular aggregation strategies, or choose "Custom" and write your own Aggregation instructions.

You can create variables directly in Brim Analytics, import them via a CSV, or import from REDCap.


We recommend optimizing your variable instructions immediately after importing or creating them, and then again after you've labeled results for a few patients. Learn more in How to Optimize Variable Instructions.


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.