Guru's Verification engine ensures consistency, confidence, and trust in the knowledge your organization shares. Learn more.

Laboratory Calculated Results

This guide will walk you through configuring a calculated results based on any number of other test results and constants.


Setting up a Calculated Test

Review the test setup guide here: Editing Lab Tests. Once you have a test created within your compendium you can access the math engine calculation setup by clicking Calculated Result.

image.png

You will be presented with a Calculated Result UI where you can write your formula. In this guide we will walk through setting up an EGFR calculated test with variants by race and sex.

image.png

Supported Operators

Operator

Syntax

Purpose

( )

(2-2)*4 = 0

Encapsulate portions of your formula to alter order of operation.

+

a+b

Addition

-

a-b

Subtraction

*

a*b

Multiplication

/

a/b

Division

^

a^b

Exponent

!

a!

Factorial

#

a#b

Modulo

%

a%

Allows representation of percentages within your formula. 20% = .2

sqrt()

sqrt(a)

Square root

∛a

Cube root

∜a

Fourth root

^^

a^^b

Tetration

Entering your formula

Start by entering the specimen number of your validation test here:

image.png

Use the Constants search box to help populate your formula. Selecting a constant from the search box will add it to your formula within { }. These brackets indicate the math engine needs to pull the related value in dynamically.

image.png

If your formula applies to all same gender calculations click the Copy to Same Gender button. In our example, we are writing the formula into the Male calculation. Clicking this button copies the formula to all other Male calculations.

image.png

Configure your formula changes for other race/gender combinations. As you do this and click Run Preview you will notice both your constants and the actual calculation result will update on the far right panes.

image.png

Advanced Calculation Methods

The following calculation methods describe use of aggregate functions over a specified day time period.

The following aggregate functions are supported

Aggregate Function

Syntax

Description

Avg

{AvgX_TestName}

Put Avg and the X = number of days followed by and underscore in from of your test name within {brackets}. This will perform a system lookup for the patient on this specific test over the past X days and return an average of all results found. Leave X out entirely and it will perform the average of all results for all time.

Example: {Avg14_EGFR} would return the average of all approved EGFR results for a patient over the past 14 days.

{Avg_EGFR} would return the average of all approved EGFR results for a patient.

Sum

{SumX_TestName}

Same syntax as above

Example:

{Sum7_EGFR} would return the average of all approved EGFR results for a patient over the past 7 days.

Max

{MaxX_TestName}

Same syntax as above

Example:

{Max30_EGFR} would return the average of all approved EGFR results for a patient over the past 30 days.



Min

{MinX_TestName}

Same syntax as above

Example:

{Max30_EGFR} would return the average of all approved EGFR results for a patient over the past 30 days.





Using IF statements

Some formulas may require use of an IF statement. For example, the EGFR formula using min() and max() will require use of IF statements as min() and max() functions are reserved for the above logic.

The CKD-EPI EGFR formula shown below can be written into GoRev as seen in the screenshot.

eGFR = 142 x min(standardized Scr/K,1) α * max(standardized Scr/K,1) -1.200 * 0.9938 age in years * 1.012 [if female]

image.png

This is the formula for Male (assumes your test is named Creatinine, if not you must update the formula to match your test's name)

142 × if({Creatinine}/.9 >=1,1,{Creatinine}/.9)^-0.302 × if({Creatinine}/.9 >=1,{Creatinine}/.9,1)^-1.200 × 0.9938^{Patient Age}

This is the formula for Female

142 × if({Creatinine}/.7 >=1,1,{Creatinine}/.7)^-0.241 × if({Creatinine}/.7 >=1,{Creatinine}/.7,1)^-1.200 × 0.9938^{Patient Age} × 1.012

System Processing of Calculated Tests

The GoRev LIMS will automatically process your formula for calculated tests on each specimen currently in any status other than Approved or any custom status configured as an Approved (locked) status. It will ONLY perform auto calculations on results collected within the past 30 days. This 30 day default can be altered via submission of a support ticket to the GoRev team.

There are two triggers for calculation to occur

  1. Upon interfaced in test results for all constants in your formula from your lab devices
  2. Upon manual entry of test results for all constants in your formula

Note: You may have to close and re-open the Edit Results UI on a specimen. The view PDF will always render with current results.


GoRev Support Team

If you have any questions, concerns, or problems regarding this GoRev Tutorial, please contact the GoRev Support Team by submitting an IT Support Ticket, by phone at 1-(317)-794-3900, and/or by email at ask@gorev.com.

Note: If possible, always submit an IT Support Ticket detailing any problem that you are experiencing within GoRev. This will give GoRev Support Agents access to additional information that will help expedite the resolution of your issue. If you are unsure how to submit an IT Support Ticket in GoRev, please see the IT Support Ticket Creation for assistance.

You must have Author or Collection Owner permission to create Guru Cards. Contact your team's Guru admins to use this template.