# Base excess value

**URL:** https://discourse.kitware.com/t/base-excess-value/1071
**Category:** Pulse Physiology Engine
**Created:** [July 28, 2023, 1:12pm UTC](https://discourse.kitware.com/t/base-excess-value/1071 "2023-07-28T13:12:06Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Finn\_Marquardt](https://discourse.kitware.com/user_avatar/discourse.kitware.com/finn_marquardt/32/706_2.png) [@Finn\_Marquardt](https://discourse.kitware.com/u/Finn_Marquardt)
#### Post date: [July 28, 2023, 1:12pm UTC](https://discourse.kitware.com/t/base-excess-value/1071/1 "2023-07-28T13:12:06Z")

</div>

Hello, for our project we need a “base excess” value. Does the physiology engine provide that value somehow?

---

<div class="post-metadata">

### Author: ![Finn\_Marquardt](https://discourse.kitware.com/user_avatar/discourse.kitware.com/finn_marquardt/32/706_2.png) [@Finn\_Marquardt](https://discourse.kitware.com/u/Finn_Marquardt)
#### Post date: [July 31, 2023, 10:29am UTC](https://discourse.kitware.com/t/base-excess-value/1071/2 "2023-07-31T10:29:58Z")

</div>

I just found out you can just calculate that value.

BE = 0,9287 \* HCO3 + 13,77 \* pH - 124,58

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 31, 2023, 1:25pm UTC](https://discourse.kitware.com/t/base-excess-value/1071/3 "2023-07-31T13:25:47Z")

</div>

We worked on this in the past, and have a branch out there with this implementation.

Can you provide the source for that equation?

---

<div class="post-metadata">

### Author: ![Finn\_Marquardt](https://discourse.kitware.com/user_avatar/discourse.kitware.com/finn_marquardt/32/706_2.png) [@Finn\_Marquardt](https://discourse.kitware.com/u/Finn_Marquardt)
#### Post date: [July 31, 2023, 1:58pm UTC](https://discourse.kitware.com/t/base-excess-value/1071/4 "2023-07-31T13:58:48Z")

</div>

[http://www-users.med.cornell.edu/~spon/picu/calc/basecalc.htm](http://www-users.med.cornell.edu/~spon/picu/calc/basecalc.htm)

---

<div class="post-metadata">

### Author: ![Finn\_Marquardt](https://discourse.kitware.com/user_avatar/discourse.kitware.com/finn_marquardt/32/706_2.png) [@Finn\_Marquardt](https://discourse.kitware.com/u/Finn_Marquardt)
#### Post date: [July 31, 2023, 3:04pm UTC](https://discourse.kitware.com/t/base-excess-value/1071/5 "2023-07-31T15:04:04Z")

</div>

I just checked the results again and I get different values when I use the equation based on HCO3 or pCO2 and I am not sure which one is “better”. Where can I find your implementation?

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 31, 2023, 3:08pm UTC](https://discourse.kitware.com/t/base-excess-value/1071/6 "2023-07-31T15:08:13Z")

</div>

Here is a really old branch with the original equasion programmed in

[https://gitlab.kitware.com/physiology/engine/-/tree/exp/BaseExcess?ref\_type=heads](https://gitlab.kitware.com/physiology/engine/-/tree/exp/BaseExcess?ref_type=heads)

I need to rebase it to the latest

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 31, 2023, 7:13pm UTC](https://discourse.kitware.com/t/base-excess-value/1071/7 "2023-07-31T19:13:38Z")

</div>

I need to finish up a merge request, but then I will update this branch and put both of those equasions in to see how they look

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [August 1, 2023, 5:57pm UTC](https://discourse.kitware.com/t/base-excess-value/1071/8 "2023-08-01T17:57:15Z")

</div>

Note the provided pH, pCO2, HCO3 below is all based on the blood substance concentrations in the Aorta.  
pH is about 7.42 at time 0 using our Standard Male patient

As a starting point for Pulse to provide Base Excess, I am putting in an equation based on the HCO3 rather than the pCO2 version.  
`double baseExcess = (0.9287 * HCO3_mEq_Per_L) + (13.77 * pH) - 124.58;`

This is going to be more accurate in Pulse as it uses more constituate components that Pulse calculates with more precision. The pCO2 equation relies on an equation to calculate the expected HCO3 as a function of that pCO2. Pulse actually computes the HCO3 distribution and pH in all parts of the body as part of its [blood gas distribution method](https://gitlab.kitware.com/physiology/engine/-/blob/stable/src/cpp/engine/common/system/physiology/Saturation.cpp#L377). This results in a base excess of 1.6, where the pCO2 version calclates 0.5. Both are valid as heathly base excess seems to be is in the range of [-2,2]. The difference is that the HCO3 calculated based on the Aorta pCO2 (39.4 mmHg) is 24.7 where as the HCO3 computed by Pulse in the Aorta is 25.8 mEq/L. These equations are pretty sensitive. There does seem to be more [detailed equations](https://pubmed.ncbi.nlm.nih.gov/12059083/#:~:text=Most%20equations%20used%20for%20calculation,x%20(pH%20%2D7.4)%5D.) we could dig into though. Our blood gas distribution method implementation is one of the more time consuming algorithms in our engine and could also use a review. Which should happen for or next next version. Once I get BaseExcess added and merged into integration, we are staring the process of officially releasing our next version. This mostly includes running a detailed validation assessmet, merging into stable, tagging the repo, and building new binaries for use in our Explorer, Unity Asset, and Unreal Plugin. With that complete we will start work on our next next release which should include a review of our blood gas distribution algorithm.

Of course as you work with Pulse and find anything unexpected, please let us know here so we can address it. I should have this into our integration branch by tomorrow.

---

<div class="post-metadata">

### Author: ![Finn\_Marquardt](https://discourse.kitware.com/user_avatar/discourse.kitware.com/finn_marquardt/32/706_2.png) [@Finn\_Marquardt](https://discourse.kitware.com/u/Finn_Marquardt)
#### Post date: [August 3, 2023, 10:31am UTC](https://discourse.kitware.com/t/base-excess-value/1071/9 "2023-08-03T10:31:35Z")

</div>

Thanks for help! I was using the pCO2 version but will switch to your version now
