Skip to content

Medical calculator for intensive care unit

License

Notifications You must be signed in to change notification settings

radioxoma/heval

Repository files navigation

Heval: the human evaluator. Calculate what your human crave!

Heval is a medical calculator for intensive care unit. Easy to use and ugly as hell, see screenshots.

From just sex and height it evaluates IBW, BSA, fluid, respiratory and parenteral nutrition demands, urinary output, some drugs dosage and more. ABG interpreter reveals hidden processes, suggests urgent correction measures and infusion therapy.

Main features:

  • Minimal user input — unknown values estimated automatically whenever possible (e.g. weight by height)
  • Only measurable parameters — no need to speak with a human of interest
  • No "Calculate" button — evaluated data changes immediately with your input
  • Every calculation referenced and explained in source code, so everyone can reproduce it
  • It's got electrolytes

Tabs overview

Tip: Get yourself a ruler, not all humans are able to talk.

Human body

Ready to use if you have filled sex and height.

Nutrition

Ready to use if you have filled sex and height. No need to change additional parameters.

Arterial blood gas & Electrolytes

Tip: You can test Heval's ability to interpret ABG with case studies. Some books provide case studies with invalid data (see below).

Requires some bloodwork to be done. Take arterial blood gas sample whenever possible.

  1. Enter only pH and pCO2 for simplest acid-base status assessment
  2. Enter electrolytes to reveal hidden processes (anion gap, delta-gap) and general electrolyte disturbances
    • Algorithm able to detect mixed acid-base disorders, vomiting etc
    • Hi-low electrolytes correction strategies
    • Tips for emergency cases
    • Sex and weight used only for dosage calculations, not for ABG diagnostics itself
  3. Enter optional data for precise calculations in complex cases

Please use a real patient's data: all electrolytes interconnected by electroneutrality law, Henderson-Hasselbalch equation. So even if you enter values in reference range, calculations can produce a broken result, especially anion gap (e.g. 149 - (101 + 24) = 24 which is >16 mEq/L!). Some imagined case studies from books aren't designed well and will fail too.

eGFR

Just estimated glomerular filtration rate for tool completeness.

  • MDRD and CKD-EPI for adults. Cockcroft-Gault formula omitted intentionally.
  • Schwartz revised 2009 for children

Disclaimer

Heval is an experimental software. Whatever it calculates, it's your decisions will affect your human's live longevity. I have no responsibility for your collateral damage.

An web or Android application is planned, but implementation deferred until calculations being tested and I'll get some feedback.

Key: Garbage -> Limited -> Medium -> Good -> Excellent

Function Status Comment
Human body: anthropometry Good Straightforward implementation. Broselow for children.
Human body: respiration Good Use as start ventilator settings for adults and children
Human body: energy & electrolytes Limited Generic approximation for healthy human. Real demands are unpredictably dependent on body fat/muscle compound, fever, sepsis, burns etc. REE formulas has been taken from original papers, so your lovely Harris-Benedict equation don't have dubious correction coefficients, leading to irreproducible result.
Human body: fluid demand Limited Generic approximation for healthy human. Pathologic fluid loss must be taken into account
Human body: urinary output Good Simple ml/kg/h approach for adults and children, though eGFR estimation may be necessary
Human body: drug dosage Medium Verified, but limited drug list
Nutrition Limited Enteral and parenteral. Based on ESPEN 25-30 kcal/kg recommendation and nitrogen balance. Use indirect calorimetry if you need a real tool.
ABG: pH correction Limited Recent papers deny benefit from iv bicarbonate if BE <-15 mEq/L. Mortality decrease is possible in AKI patients. No validated formula found.
ABG: anion gap Good Excellent prediction, but please USE REAL DATA
ABG: Electrolytes replacement Limited Exact depletion/excess estimation is impossible due to multiple body compartments. High/low warnings still usable though. K+ — no reliable model, use daily requirement and standard iv replacement rate for hypokalemia. Na+ — Adrogue and classic one compartment model. Cl- — no model at all. Multiple calculation methods in books, few applicable in real world.
eGFR Good Straightforward implementation for adults and children

Installation semver semver

Windows

Download exe file from the releases page. Just run it — installation is not required.

  • v0.1.5 is last compatible with Windows XP SP3 x86 and python 3.4.3.
  • Latest development version can be installed with pip install https://github.com/radioxoma/heval/archive/master.zip. You may need to upgrade pip.

Mac OS X

Download dmg file (Apple Disk Image with 64-bit Heval.app) from the releases page. Unpack Heval.app from dmg. Application unsigned, so warning "macOS cannot verify the developer of "Heval"" will appear if you try to run it. You can overcome this in one of two ways:

  • Press Control and simultaneously click on unpacked Heval.app. Click Open in appeared context menu. Click Open in appeared window
  • Run in terminal xattr -dr com.apple.quarantine "Heval.app". Now "Heval" can be run by click

Linux

Tip: Archlinux AUR package heval-git available.

Heval is written in pure python3 and uses tkinter for GUI. Install dependencies and run code directly:

$ sudo apt install git python3-tk  # Debian / Ubuntu
$ sudo pacman -S git python tk  # Archlinux

$ git clone https://github.com/radioxoma/heval.git
$ cd heval
$ python -m heval

Instead of executing python -m heval it's possible to double-click 'heval.desktop'.

Screenshots

2023-04-02_17-39-38 2023-04-02_17-46-04