Skip to main content
Journal of Pathology Informatics logoLink to Journal of Pathology Informatics
. 2017 Jul 25;8:28. doi: 10.4103/jpi.jpi_28_17

Implementation of Automated Calculation of Free and Bioavailable Testosterone in Epic Beaker Laboratory Information System

Michael C Chung 1, Saurabh Gombar 1,2, Run Zhang Shi 2,
PMCID: PMC5545775  PMID: 28828199

Abstract

Background:

Automated calculations by laboratory information system (LIS) are efficient and accurate ways of providing calculated laboratory test results. Due to the lack of established advanced mathematical functions and equation logic in LIS software, calculations beyond simple arithmetic functions require a tedious workaround. Free and bioavailable testosterone (BT) calculations require a quadratic solver currently unavailable as ready to use the function on most commercial LIS platforms. We aimed to develop a module within the Epic Beaker LIS to enable automatic quadratic equation solving capability and real-time reporting of calculated free and BT values.

Materials and Methods:

We developed and implemented an advanced calculation module from the ground up using existing basic calculation programming functions in the Epic Beaker LIS. A set of calculation variables were created, and mathematical logic and functions were used to link the variables and perform the actual quadratic equation based calculations. Calculations were performed in real-time during result entry events, and calculated results populated the result components in LIS automatically.

Results:

Free and BT were calculated using instrument measured results of total testosterone, sex hormone binding globulin, and/or serum albumin, by applying equations widely adopted in laboratory medicine for endocrine diseases and disorders. Calculated results in Epic Beaker LIS were then compared and confirmed by manual calculations using Microsoft Excel spreadsheets and scientific calculators to have no discrepancies.

Conclusions:

Automated calculations of free and BT were successfully implemented and validated, the first of such implementation for the Epic Beaker LIS platform, eliminating the need of offline manual calculations, potential transcription error, and with improved turnaround time. It may serve as a model to build similarly complex equations when the clinical need arises.

Keywords: Bioavailable testosterone, calculation, Epic Beaker, free testosterone, laboratory information system, quadratic equation

INTRODUCTION

Clinical laboratories have conventionally relied on the laboratory information system (LIS) to perform automated though simple arithmetic: addition, subtraction, multiplication, divisions, and log functions. These operations were sufficient for calculating laboratory-derived values such as anion gap, unconjugated bilirubin, and albumin/creatinine ratio. Most LIS vendors offer a more complex function in recent years for the widely adopted calculation of estimated glomerular filtration rate based on Modification of Diet in Renal Disease logarithmic equation.[1] However, development of not readily available calculation function in LIS based on complex math such as a quadratic equation can be challenging and usually requires additional IT resource and technical know-how.[2] Consequently, these complex calculations were performed manually offline and results were manually entered back into the LIS. This type of workaround is inefficient and is prone to errors in transcription and in patient identification, and may lead to delay in reporting. Although many LIS systems offer rudimentary functions that have long been in existence in scientific calculators and in spreadsheet software, implementing new complex calculations in LIS often requires working with LIS vendor and availability of in-house LIS customization expertise.

We recently started to offer calculated free testosterone (FT) and bioavailable testosterone (BT) results as part of the expansion of our clinical endocrinology laboratory tests. The calculations were based on published formulas[3,4] widely accepted and adopted in the clinical diagnostic arena. We built calculation functions initially in Microsoft Excel,[5] requiring manual entry of instrument performed sex hormone binding globulin (SHBG), serum total testosterone (TT), and albumin results. The resulting calculated FT and BT were then transcribed back into the LIS. This step introduced the possibility of transcription errors and errors in patient identification. With the implementation of the Epic Beaker LIS (Madison, WI) to streamline communication with our hospital EMR also through the same vendor, we looked to automate the process to eliminate potential transcription and patient identification errors, and to increase efficiency. We needed to build from the ground up a quadratic solver to automate FT and BT calculation. We were able to develop and set up such an automated process so that test results of SHBG and albumin from instruments interfaced with the LIS would automatically populate the newly built Beaker calculation module. With uploaded TT results, calculation of FT and BT were automatic and results reported promptly. We validated the LIS calculation function to show its accuracy by simulating and applying a wide-ranging instrument performed test results including results of < or > values at extreme ends of analytical measurement ranges, and compared resultant FT and BT values with those obtained from Excel, as well as from a scientific calculator.

MATERIALS AND METHODS

Formula for the calculation of FT:[3]

FT = Inline graphic, (mol/L), in which

a = Kat + Kt+ (Kat × Kt) ([SHBG] + [albumin] − [TT])

b = 1 + Kt (SHBG) + Kat (albumin) − (Kat + Kt) (TT)

  • Kat: Association constant of testosterone for albumin

  • Kt: Association constant of testosterone for SHBG

  • (TT): Serum total testosterone in mol/L

  • (SHBG): Sex hormone binding globulin in mol/L.

Formula for the calculation of BT:[4]

BT (nmol/L), = Inline graphic

  • (TT): Serum total testosterone in mol/L

  • (SHBG): Sex hormone binding globulin in mol/L.

Calculation of FT and BT by excel function:[5]

Due to deviations of unit of measure of results coming from instruments, API5500 (Sciex, Redwood Shores, CA, USA) and Abbott Architect (Libertyville, IL, USA), unit of measurement conversions were carried out in Excel as follows:

  • (SHBG in mol/L) = (SHBG in nmol/L) × (nmol ÷ 109 mol)

  • (TT in mol/L) = (TT in ng/dL) × (nmol ÷ 288.4 ng) × (mol ÷ 109 nmol) × (10 dL/L).

Laboratory information system

EPIC Beaker (Madison, WI, USA) was the designated LIS in our institution. Instruments performing SHBG, albumin were directly interfaced with LIS. TT was by LC-MS/MS, and results were automatically uploaded to LIS through flat file transfer.

Building calculation module in Epic Beaker

Unit conversion for sex hormone binding globulin from architect and total testosterone from API5500

Prerequisite step to ensure the unit of measure for both SHBG and TT are in mol/L.

  • (SHBG in mol/L) = (SHBG in nmol/L) × (nmol ÷ 109 mol)

  • (TT in mol/L) = (TT in ng/dL) × (nmol ÷ 288.4 ng) × (mol ÷ 109 nmol) × (10 dL/L).

Setup calculation variables and link to result components in Beaker

  • Variable α# – Testosterone result component

  • Variable β – Sex hormone binding globulin

  • Variable γ – Albumin.

#Variables in numeric numbers 1, 2, and 3 were substituted by Greek alphabets α, β, γ, respectively, for clarity.

Setup delta as part of equation solver for variable {δ} (= {4})

δ = (({β} − ({α}/28.84)) + (1+ ({γ} × 10 × 36000/69000)))2+ (4× (1+ (({γ} × 10) × 36000/69000)) ×{α} × 10/288.4).

Setup all equations used for final calculations

FT = (({δ})0.5) − (({β})({α}/28.84) + (1+ (({γ} × 10) × 36000/69000))) × 288.4/(2× (1+ (({γ} × 10) × 36000/69000)) × 10).

BT = 28.84× $zexp (0.955× ($zln ({α} × 10/288.4)) − 0.266− (0.228× $zln ({β}))).

Setup reflex actions to append interpretative reference ranges and comments

Reflex actions are setup on the test level to append appropriate reference ranges and result comments according to patients age and gender.

All codes were made available through Epic users group for institutions wishing to implement the module developed and reported here.

Validation of Epic Beaker calculation of free testosterone and bioavailable testosterone

A set of 20 specimens were collected from patients with different genders and age groups. TT, albumin, and SHBG were performed on multiple instruments and results (TT and albumin) were populated on an Excel spreadsheet setup for BT with the calculation formula, and results (TT, SHBG, and albumin) were populated on a separate Excel spreadsheet setup for FT.[5] Validation of the results was performed step-wise following quadratic solver embedded in the formulas. These instrument results were also entered in Beaker LIS test environment, and the calculated results of FT and BT were compared with and verified by the results from the Excel spreadsheets. A separate comparison was performed using results from scientific calculators. The high and low-end results from the instruments were also taken into consideration, making sure that the Beaker LIS calculations would not deviate within the full analytical ranges of the assays.

After all the validation was completed, the new calculation formulas and result components were moved to the Beaker LIS production environment. The instrument interface was then activated in the production environment so that TT, albumin and SHBG results from the instruments were directly and automatically populated in Beaker LIS. During the first few batches of specimen run in production over 4 weeks, laboratory personnel also entered all these instrument results on the Excel spreadsheets in use prior, and both sets of results were cross checked and verified to make sure the Beaker LIS calculations were accurate across all gender and age groups of patients. Any potential discrepancies were to be reported to the medical director and LIS analyst for further investigation.

RESULTS

We developed advanced calculations from the ground up in Epic Beaker LIS and implemented them in the clinical diagnostic laboratory, as there is no precedent of equation based formula for FT and BT calculations in Epic LIS, nor any such calculation template available in the Epic Foundation system.[6] The calculation of FT is based on the equation developed and reported by Vermeulen et al., 1999[3] and calculation of BT is based on equation reported by Morris et al., 2004,[4] requiring instrument performed test results for SHBG, TT and/or albumin as components of equations.

A set of calculation variables were created in Epic Beaker, and complex mathematical logic and functions were used to link the variables and perform final calculations [Figure 1]. Calculations were performed on the background during result entry events, and calculated results were populated in result components of the specimens automatically [Table 1]. Calculated results in Epic Beaker were then validated and compared to manual calculations by Excel worksheets and by scientific calculators and were found to be accurate without any discrepancies, under wide range input variables.

Figure 1.

Figure 1

Calculation display of Epic Beaker laboratory information system

Table 1.

Epic Beaker laboratory information system result components

graphic file with name JPI-8-28-g004.jpg

The workflow before implementing automatic calculation was to first transcribe results of TT, SHBG, and albumin onto printouts of sample batch, review the transcriptions for errors, and subsequent transcription to Excel files[5] set up for the calculation separately FT and BT, and finally transcribe calculated FT and BT values based on Excel printouts, back to LIS and release reports. All above steps were eliminated after the implementation of LIS calculation. With the instrument results of albumin and SHBG automatically populate, once TT results were uploaded to LIS, FT, and BT results were promptly reported with the appropriate set up of auto-verification in LIS. Such increase in efficiency and time saving is estimated to be more than 1–2 h for a batch of fifty of FT or BT samples.

CONCLUSIONS

Automated calculations of FT and BT were developed, setting a precedent for future development of complex equation based calculations, and were successfully implemented in Epic Beaker LIS. It eliminated the need of manual calculations and transcribing calculated results in LIS. Test turnaround time and efficiency were improved using the newly implemented real time calculations. The calculation process in Beaker LIS may serve as a model for additional complex equation based calculations in the future when clinical needs arise.

Financial support and sponsorship

Nil.

Conflicts of interest

There are no conflicts of interest.

SUPPLEMENT MATERIAL

Footnotes

REFERENCES

  • 1.Levey AS, Bosch JP, Lewis JB, Greene T, Rogers N, Roth D. A more accurate method to estimate glomerular filtration rate from serum creatinine: A new prediction equation. Modification of Diet in Renal Disease Study Group. Ann Intern Med. 1999;130:461–70. doi: 10.7326/0003-4819-130-6-199903160-00002. [DOI] [PubMed] [Google Scholar]
  • 2.Sepulveda JL, Young DS. The ideal laboratory information system. Arch Pathol Lab Med. 2013;137:1129–40. doi: 10.5858/arpa.2012-0362-RA. [DOI] [PubMed] [Google Scholar]
  • 3.Vermeulen A, Verdonck L, Kaufman JM. A critical evaluation of simple methods for the estimation of free testosterone in serum. J Clin Endocrinol Metab. 1999;84:3666–72. doi: 10.1210/jcem.84.10.6079. [DOI] [PubMed] [Google Scholar]
  • 4.Morris PD, Malkin CJ, Channer KS, Jones TH. A mathematical comparison of techniques to predict biologically available testosterone in a cohort of 1072 men. Eur J Endocrinol. 2004;151:241–9. doi: 10.1530/eje.0.1510241. [DOI] [PubMed] [Google Scholar]
  • 5.Excel Files for FT and BT Calculation; See Supplemental Material [Google Scholar]
  • 6.Epic Beaker Foundation Sytem. Access Available to Institution Subscribers and Users. www.epic.com/community/sharing .

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

SUPPLEMENT MATERIAL

Articles from Journal of Pathology Informatics are provided here courtesy of Elsevier

RESOURCES