This code partially used in my clinical application - Heval. Feel free to check it out.
Some time ago, being a medical student, I started learning acid-base balance in our hospital ICU. We been using ABL 800 Flex blood gas analyzer and I always wondering why it's report is so complicated. I know only that many of those parameters are derived from few really measured values.
Information about applied calculations relatively scattered; online calculators use simplified techniques. But fortunately there is ABL800 Flex Reference manual, which contains formulas implemented in device software.
Application of mentioned formulas is not always straightforward, so I decided to make some reverse-engineering of device calculation function in edication purposes.