Development of a Software to Determine Disturbances
in the Acid-Base Balance in Human Blood
A. Reyes-Lazalde^{*} M. Reyes-Monreal^{**} M.E. Pérez-Bonilla^{*} R. Reyes-Luna^{*} ^{*}Laboratorio de Biología
Interactiva, Escuela de
Biología, BUAP. Blvd.
Valsequillo y Av. San Claudio,
Edificio 112-A, Col. Jardines
de San Manuel. CP. 72570,
Puebla, Pue. |
Keywords: acid-base, base excess, Stewart model, anion gap, medical education. |
Correspondencia: |
Palabras clave: ácido-base, exceso de base, modelo de Stewart, brecha aniónica, educación médica. |
Introduction
Acid-base alterations commonly present in patients found in intensive care units [1]. Various organs are involved in the regulation of acid-base and for this reason intensivist doctors are experts in the diagnosis and management of complicated alterations in acid-base balance [2]. In clinical practice, when the acid-base imbalances in the patient are severe, inappropriate and not rapidly corrected, they can lead to the death of the patient.
Compensatory physiological processes and mixed acid-base imbalances may complicate diagnosis and, consequently, the patient’s treatment [3]. For this reason, the correct quantification of this imbalance, which permits the detection of complex metabolic alterations, is very important [4,5]. Consequently, the ability to diagnose and manage acid-base alterations rapidly and effectively is fundamental for the treatment of seriously ill patients. The doctor relies on laboratory data such as pH and blood gases (various apparatus measure the concentration of bicarbonate [HCO_{3}^{-}]), ion concentration, glucose and routine tests such as blood chemistry and complete blood count, amongst others.
If the doctor needs to carry out more advanced studies with this data in order to determine a complex metabolic alteration or a compensatory process, it is important that it is processed by a program designed to calculate this data. Otherwise, it is necessary to use a scientific calculator and record the corresponding mathematical operations. In these conditions, the simultaneous solution of various equations could become impossible. There is a vacuum of software for both the quantification of acid-base alterations and the teaching of it. In 1990, Siggaard-Andersen y Siggaard-Andersen [6] reported a program for PC that is executable using DOS version 2.11. This program determined the partial oxygen pressure (PaO_{2}), which is the concentration of O_{2} and acid-base state. However, this is not currently available and there exists no update. There are only two programs for the calculation of blood acid-base available on the internet, both of which correspond to the Stewart Model: (1) The program developed by Figge y Fencl (www.figgefencl.org), which has a teaching application and whose computer process 3.0 can be found on their webpage, which, to be used, requires the editor Visual Basic, which is associated with Excel. To achieve this requires both computational knowledge, 2) the program developed by Watson to which, however, access is not always available (www.med.sc.edu:96/watson/Acidbase/Acidbase. htm).
Huerta-Torrijos et al., developed an Excel spreadsheet that permits the annotation of the patient’s clinical data and the systematic analysis of the blood acid-base evolution in the patient, and, to determine [H^{+}], uses a table of equivalence between pH and [H^{+}] for discontinuous pH values. It does not, however, carry out other calculations [7]. In these circumstances, it is important to use software to determine acid-base imbalances that is executable, easy to use, does not require an internet connection or another type of software, and includes all the available calculation methods.
There are three specific methods for the quantification of acid-base distortions: (1) the classic, (2) the chemical, and (3) the physicochemical [2,8]. The first is based in the concentration of bicarbonate [HCO_{3}^{-}], the second in base excess (BE)[9], and the third in strong ion difference (SID)[10,11,12,13].
The classic method uses the Henderson-Hasselbalch (H-H) equation; which has a clinical value in two senses: (1) it determines whether the laboratory results are correct, and (2) if the laboratory data are incomplete, this equation males it possible to obtain the missing data - for example if the pH value and arterial pressure of carbon dioxide (PaCO_{2}) are known, it is possible to calculate [HCO_{3}^{-}][14]. However, with this method, it is not possible to precisely measure metabolic imbalances. To resolve this restriction, chemical and physicochemical methods have been used and, in this sense, are complementary. The former uses the standard base excess equation (SBE)[15], while the second uses the Stewart Model[16].
The chemical method uses the SBE and orients the doctor in their administration of doses of acids or bases, depending on the case, to restore the blood pH. The physicochemical method uses the Stewart Model and permits the identification of respiratory and metabolic alterations (specifically metabolic alterations caused by illnesses of the liver, digestive system or kidney). On the other hand, the classic method is not able to specify the cause of a metabolic alteration. Stewart proposed a system formed of three independent variables: SID, PaCO_{2}, and the concentration of weak or non-volatile anions (A_{TOT })[16]. The changes in these variables affect the concentration of hydrogen ion and bicarbonate. This method has been modified in order to be more practical and is from where the Figge Model (which includes an albumin and phosphoric acid system) and the Watson Model (which uses an algorithm to simplify both models) [17,18,19].
It is clear that all the methods are useful in the diagnosis of acid-base imbalances. Each one of the methods contributes important characteristics: the H-H equation is simple to implement and allows differentiation if the alteration is respiratory or metabolic; the SBE equation is oriented around therapeutic aspects; the Stewart equation allows the differentiation of problems of a metabolic nature.
The issue of acid-base balance does, however, become complicated for both medical students and doctors in general, principally due to the level of mathematics involved. For example, the Stewart Model is formed by non-linear equations that must resolve themselves simultaneously. As mentioned, although this model better permits the differentiation of metabolic alternations than the Henderson-Hasselbalch (H-H) equation, it is not commonly used and is omitted from the relevant courses. This situation is explained by the fact that when the Stewart Model was published, personal computers were very expensive and it was necessary to have computational knowledge and the ability to operate MSDOS. These conditions have changed, where graphic platforms such as Windows^{ }
®;greatlyfacilitatetheuseofthecomputerand,therefore,maketheomissionofthismodelfromcoursesonacid- baseimbalanceunjustified.Itis,however,necessarytoimplementsoftwarethatmakesiteasierforthedoctortouse.AccordingtoKellum[20],itispossibleanddesirabletouseallofthemethods.Consequently,thisstudydevelopsacomputerprogramtocalculateacid- basestatethatcombinesallthemethodsinsuchawaythattheycanbeusedseparatelyorincombination,whichinitselfwouldhavegreatuseforteachinginthisarea.
A program that integrates the calculation tools for the study of blood acid-base alterations must be able to carry out the following actions: diagnose respiratory or metabolic acidosis and alkalosis and distinguish whether they stem from an acute or chronic condition. Such a program must also be able to determine whether a compensatory process exists, appropriate [H^{+}] concentration values for any pH value with greater precision than the tables commonly used, determine which organs are involved in metabolic acid-base imbalances, and determine the acid or base deficit, depending on the case, necessary to restore blood pH.
PROGRAM DESCRIPTION
The program comprises three principal modules: (1) the physiological approach, (2) the chemical approach, and (3) the physicochemical approach. Figure 1 depicts an operational diagram of the program, showing the different calculations that can be carried out.
The physiological approach module has a menu with the following options:
- Calculation of [H^{+}], in which Equation 2 is used.
- Calculation of pH, PaCO_{2}, or [HCO_{3}^{-}]. When two of these variables are known, Equation 1 is used to obtain the third.
- A table of equivalence between pH and [H^{+}]. From here it is possible to compare the values of [H^{+}] in the table with the values determined by Equation 2.
- Davenport diagram. Using the H-H equation, a point is obtained and then is placed on the Davenport diagram, which produces a preliminary diagnostic of the corresponding acid-base alteration, in accordance with the classification used by Di lorio et al. [21]. From this, chronic or acute respiratory acidosis or alkalosis and chronic or acute metabolic acidosis or alkalosis can be determined.
- Anion gap in accordance with Emmett and Narins [22] and Kraut and Medias [23], which allows a diagnostic of metabolic alterations.
- Compensatory processes. It becomes important for the doctor to know whether the acid-base imbalance is already presenting a compensatory process.
Fig. 1. Diagram of the calculations it is possible to conduct with the Equilibrar program. In each module, it is possible to carry out the specified calculations in the box, according to the direction of the arrows.
The chemical approach module consists of three secondary modules: excess base calculation, standard base excess calculation, and corrected excess base calculation.
The third module corresponds to Stewart’s physicochemical approach. Here, it is possible to calculate pH, [H^{+}], SID, the apparent strong ion difference (SIDa), the strong ion gap (SIG), [HCO_{3}^{-}], the anion gap (AG), the anion gap corrected (AGc), and the standard base excess. For these calculations, it is necessary to know the concentrations of Na^{+}, K^{+}, Mg^{2+}, Ca^{2+}, Cl^{-}, albumin, phosphate, PaCO_{2}, and the strong unmeasured anions that could be obtained indirectly from the calculation of the anion gap corrected (AGc) with the concentration of albumin.
Each module is based on the equations that correspond to the physiological, chemical, and physicochemical approaches.
Module I: Physiological approach
The physiological approach is based on the classic theory of acid-base balance that requires the use of the H-H equation, where the laboratory values [HCO_{3}^{-}] y PaCO_{2} are used to calculate blood pH. The H-H equation is used in the following manner:
| (1) |
The program determines the concentration of [H^{+}] from any value of blood pH. In order to report the concentration of [H^{+}] with maximum precision, greater than that provided by the calculation tables, a non-lineal mathematical adjustment was carried out on the data reported in the literature with the program Eureqa Formulize 0.96 beta, from which the best adjustment obtained was the following (r^{2}= 0.99):
H = | (2) | ||
- sen(11.5sen(5.34 + pH)) | |||
cos | |||
- 40.3sen(pH) |
The Davenport Diagram was loaded onto the computer (see Figure 6). A preliminary diagnostic can be obtained from this diagram for metabolic or respiratory acid-base imbalances, which can also distinguish whether the condition is acute or chronic.
To determine the compensatory processes, the empirical equations were integrated on the basis of the medical experience reported in the literature.
- In metabolic acidosis, the compensatory response is a respiratory alkalosis with an expected reduction in
PaCO_{2}, with a response time of between 12 and 24 hours. The equation used for the calculation
was:
(3) - In metabolic alkalosis, the compensatory response is a respiratory acidosis with an expected
increase in PaCO_{2}, with an irregular response time. The equation used for the calculation
was:
(4) - In respiratory acidosis, the compensatory response is a metabolic alkalosis with an expected increase in
bicarbonate, with a response time expected according to the details of the case: in an acute condition,
the response appears within minutes, while in a chronic condition, the response appears within two to
four days. The equations used in this calculation were:
Acute condition:
(5) Chronic condition:
(6) - In respiratory alkalosis, the compensatory response is a metabolic acidosis with an expected
reduction in bicarbonate, with a response time expected in the according to the details of
the case: in an acute condition, the response appears within minutes, while in a chronic
condition, the response appears within two to four days. The equations used in this calculation
were:
Acute condition:
(7) Chronic condition:
(8)
Module II: Chemical approach
With this module it was possible to determine the quantity of acid or base necessary to correct the blood pH. The module corresponds to the calculation of base excess. It is based on the Van Slyke equation and allows for the calculation of base excess, standard base excess and corrected base excess with the concentration of albumin and phosphate [9] in accordance with equations 9, 10, and 11. The equation for the calculation of base excess (BE) is applied in in vitro conditions and is as follows:
BE = | (HCO_{3}^{-}- 24.4 + (2.3 ⋅ Hb + 7.7) | ||
⋅ (pH - 7.4)) * (1 - 0.023 ⋅ Hb) | (9) |
In accordance with Kellum [20], the following equation of standard base excess (SBE) provides greater precision than BE in vivo:
| (10) |
However, these equations assume a normal A_{TOT }. When the concentration of albumin and phosphate decrease, as happens in the some case of some critically ill patients, the following corrected equation is used:
SBEc = | (HCO_{3}^{-}- 24.4) + ((8.3 ⋅ Alb ⋅ 0.15) | ||
+ (0.29 ⋅ PO_{4}^{-}0.32)) ⋅ (pH - 7.4) | (11) |
Module III: physicochemical approach
The model proposed by Stewart is rarely used due to the mathematical difficulties it represents for doctors and is frequently omitted by the relevant courses in medical and related degree programs. The software includes a module that allows the solution to Stewart’s mathematical model in two contexts: (1) clinical use and (2) as a didactic tool for the teaching of this area. It is necessary, for clinical use, to enter the patient’s laboratory values - similarly for didactic use, the user may increase or decrease the concentrations of each of the variables and observe what happens with the blood pH.
With the Stewart model, it is possible to determine alterations caused by renal, digestive or liver malfunction, which, in this aspect, complements the classic Henderson-Hasselbalch method.
The equations used in this module were based on the Stewart model (equations 4.3.4, 4.3.5 in Kellum y Elbers [12]). The calculation of [H^{+}] y [OH^{-}] is carried out with the following equations:
| (12) |
| (13) |
Where: K_{w}′ is the water ion product [20]: K_{w}′ = K_{w} x [H_{2}O], where K_{w} is the water dissociation constant. [SID] is the strong ion difference.
The synthesized non-linear equations in Morgan [24], which are explicitly developed in Kellum [20], Corey [25], Fidkowski and Helstrom [26], and Schück and Matouovic [27] are also used in this module. The equations are as follows:
| (14) |
The equation used for the strong ion difference:
[SID^{+}]_{ a} = | [Na^{+}] + [K^{+}] - [Cl^{-}] | (15) | |
- [lactate] - [other strong anion] |
| (16) |
Where [A^{-}] is the concentration of weak non-carbonic acids (principally albumin and phosphate) and is calculated in the following manner:
A_{TOT }^{-} = | [Alb] ⋅ (0.123 ⋅ pH - 0.631) | (17) | |
+ [PO_{4}^{-}] ⋅ (0.309 ⋅ pH - 0.469) |
| (18) |
The corrected anion gap (AG_{c}) is calculated using:
AG_{c} = | ([Na^{+}] + [K^{+}]) - ([Cl^{-}] - [HCO_{ 3}^{-}]) | ||
- (2 ⋅ Alb + 0.5 ⋅ PO_{4}^{-}) | (19) |
The strong ion gap is obtained using the following equation:
SIG = | (Na^{+} + K^{+} + Ca^{2+} + Mg^{2+}) | ||
- (Cl^{-} + lactate^{-}) | |||
- | (20) | ||
+ [PO_{4}^{-}] ⋅ (pH - 0.469)) |
| (21) |
Software development
The program was developed using the language Visual Basic^{ }
®;,version5.0(MicrosoftCorporation)onaPCwithaprocessorfeaturing1.73GHz,2.0GBofRAMandWindowsXP.Theprogramwascompiledasanexecutablefile(Equilibrar.exe)foraWindows^®;environment.ItisexecutableonanycompatiblePCavailableonthemarkettoday.
Interface
There are various boxes found in each interface; the yellow boxes are for data entry, while the green and blue boxes show the output from the calculations. The windows of the interface show the following menus found in the upper part of the window (Figure 4): (1) How to use - this shows the user how to input the data and how to use the specific module; (2) Unit converter - here the user can convert units from, for example, mmol/L a mEq/L; (3) Examples - here some clinical data is provided as an example; (4) Glossary and normal values - a glossary of abbreviations and normal values of some variables which help the user enter normal data and observe the calculated value, (5) Subject review - the user is able to review some basic concepts and themes here.
Results
The computer program that has been developed integrates the classic Henderson-Hasselbalch model, the Davenport Diagram, excess base calculation, the anion gap, Stewart’s modified model, and the calculation for compensatory processes. This program allows the user to obtain a preliminary diagnostic for acid-base imbalances, establish whether the condition is acute or chronic, and, moreover, determine the presence of a compensatory process. As the program includes a classification of corresponding acid-base alterations, in accordance with the classification used by Di Iorio et al. [21], in Module 1 the user can obtain the following clinical diagnoses: uncompensated acute respiratory acidosis, partially compensated acute respiratory acidosis, compensated respiratory acidosis, uncompensated acute respiratory alkalosis, partially compensated respiratory alkalosis, uncompensated respiratory alkalosis, uncompensated metabolic acidosis, partially compensated metabolic acidosis, compensated metabolic acidosis, uncompensated acute metabolic alkalosis, partially compensated metabolic alkalosis, compensated metabolic alkalosis, mixed acidemia and mixed alkalemia. The program features a table showing the conditions for pH, PaCO_{2} and [HCO_{3}^{-}] for each case (Figure 2).
Fig. 2. Partial view of the table of examples of preliminary diagnostic based on the work of Di Iorio et al. [21]. Carried out on the basis of the calculated values in the physiological approach module, a message with the corresponding diagnostic appears once the calculation has been made.
Fig. 3. Graphic showing, in the upper part, the box for the calculation of [H^{+}] from any value of pH. Presented below is the table of equivalences between pH and the [H^{+}].
The concentration of [H^{+}] calculated by the program is more precise than the concentration reported by Huerta-Torrijos et al. [7] in their study, in that Equation 2 measures the concentration of [H^{+}] for any value of pH; unlike a table that shows an estimated value at an interval (Figure 3).
With the objective of showing the utility of the Equilibrar program in the completion of clinical tasks, some clinical cases are described below. In the diagnostic example outlined below, the H-H equation, the Davenport Diagram and compensatory processes are used to diagnose respiratory acidosis, differentiate between an acute and chronic process, and determine whether a compensatory process is already present. Briefly, it will describe the use of the program: how to enter the data and the calculations it has to carry out.
Diagnostic example
A patient presenting pH = 7.35 and PaCO_{2} = 55 mmHg. With this data [H^{+}] y [HCO_{3}^{-}] are calculated and a preliminary diagnosis is made. The steps in the program for the calculations are as follows: <<ENFOQUE FISIOLÓGICO>> → <<CÁLCULO ÁCIDO-BASE>> → <<ecuación de Henderson-Hasselbalch>> → <<Conocemos pH y PaCO_{2} >> → <<CALCULAR>>. The result is: [H^{+}] = 46.17 y [HCO_{3}] = 28.58 and a box with a preliminary diagnostic now opens: partially compensated respiratory acidosis, in accordance with Di Iorio et al. [21] (Figure 4).
The compensatory processes module is then used to determine and confirm whether a compensatory process has already been established. While, with these calculations realized, a preliminary diagnosis of respiratory acidosis has already been made, what now needs to be determined is whether the condition is acute or chronic. To carry this out, the value PaCO_{2} = 55 is entered in the compensation interface and the value of [HCO_{3}^{-}] is checked for an acute condition, with the result being [HCO_{3}^{-}] = 25.5, a value that is far from the 28.68 previously calculated (see Figure 4). For a chronic case, the calculation was [HCO_{3}^{-}] = 29, which is close to the previous calculation. Consequently, a chronic case is suggested (Figure 5).
Fig. 4. Acid-base calculation interface by means of the classic Henderson-Hasselbalch model. The values for pH y PaCO_{2} are entered and are shown as results [H^{+}] y [HCO_{3}^{-}]. The program produces a preliminary diagnostic of partially compensated respiratory acidosis.
Fig. 5. Partial view of the interface window for the calculation of compensatory processes. The value of the partial CO_{2} pressure is entered and the button marked by arrows is pressed. In the above case, the value of [HCO_{3}^{-}] is investigated for an acute case, and below a chronic case is investigated. The value calculated, [HCO_{3}^{-}] = 29, is similar to that calculated previously; [HCO_{3}^{-}] = 28.58. These indicate a partially compensated chronic respiratory acidosis.
Fig. 6. Interface where the user can calculate pH and have the result presented graphically by means of the Davenport Diagram. The resulting point, highlighted with the arrow, is found in the area that corresponds to chronic respiratory acidosis.
The doctor can then use the patient’s clinical history and finally determine whether the diagnosis suggested by the program is accurate. The results are calculated on the basis of the fact that there is a decrease in the pH and an increase in PaCO_{2}, which is characteristic of respiratory acidosis. The increase in [HCO_{3}^{-}] suggests that the kidney is compensating.
To confirm whether the respiratory acidosis is chronic, the Davenport Diagram is used. Figure 6 shows how blood pH can be calculated from PaCO_{2} y [HCO_{3}^{-}]. With these three variables a point on the Davenport Diagram can be obtained. A circle suggesting chronic respiratory acidosis is presented in the graphic. This can be arrived at by selecting << Conocemos PaCO_{2} y [HCO_{3}^{-}] >> and entering the corresponding data obtained by the previous calculation, PaCO_{2} = 55 y [HCO_{3}^{-}] = 28.58.
Stewart model
A module for the calculation of acid-base imbalances based on the Stewart Model as modified by Watson has been developed for this software. The module <<ENFOQUE FISICOQUÍMICO>> enables calculation with units in mmol/L in accordance with Schück and Matouovic [27] or with units in mEq/L in accordance with Kellum [20]. Figure 7 shows the user interface for the case of units in mEq/L.
Clinical case and use of Stewart model
For this example, the normal values proposed by two different authors with entry parameters in mmol/L, albumin in g/L and PaCO_{2} in mmHg were selected. The results reported by Schück and Matouovic [27], are given in mmol/L; while the results reported by Kellum [20] are given in mEq/L. The module <<ENFOQUE FISICOQUÍMICO>> should be chosen in the software, which then leads to a menu from which the units that are required can be entered: (1) mEq/L or (2) mmol/L. The results are given in the units that correspond to the case. To obtain mEq/L as an output, it is necessary to input these units. If necessary, the program uses a unit converter for this task. The same process is followed in the case of mmol/L.
Fig. 7. Interface window for the Stewart Model. Cl^{-}, Ca^{2+}, Mg^{2+}, Na^{+}, K^{+}, lactate, phosphate, albumin, PaCO_{2} y pH concentrations are entered. Here the calculations for [H^{+}], [HCO_{3}^{-}], SIDa, SID, SIG, AG, AGc, BE, SBE, SBEc are carried out.
Table 1 shows two examples of normal data in mmol/L in Column A, and in mEq/L in Column B, which correspond to those reported by Schück y Matouovic [27] y Kellum [20], respectively. The output data are: HCO_{3}^{-}, AG, BE, SID y SIG. It is possible to observe that the calculated values basically coincide with the reported data. The concentrations of HCO_{3}^{-}, AG y SID are normal in every case; there is no base excess and the value of SIG tends toward zero as would be expected in a normal patient.
The data taken from Kellum [20] can be found in Column C, corresponding to a patient with acidosis. In this case, the results are given in mEq/L, for which the corresponding module is used and the necessary conversions carried out. The results between the program and those reported by the author are practically the same (C article vs C program). In this case, the program reports metabolic acidosis in which there is an increase in the anion gap, a deficit of base and SID has decreased, while the value entered for PaCO_{2} is low, indicating pulmonary compensation.
The program as a didactic tool
The subject of acid-base balance is fundamental to medical practice and a clear understanding of it will determine the effective management of critically ill patients. If we take into account that here in México, courses in mathematics and physics are not offered as part of medical degrees, the calculations involved can be very challenging for undergraduate students, principally due to the mathematics involved. This situation brings with it as a consequence a superficial level of learning in these types of areas of medicine. Each of the interfaces in the software presented in this study give the user access to a menu in the upper part of their screen that gives the following options: Exit, Authors, How to use, Examples, Subject Review, Unit Converter, and Glossary. These options give the student access to a comprehensive review of the subject and some examples from the study of blood pH imbalance, while the glossary explains the abbreviations used in the program and indicate the normal values for each of the variables. Of particular didactic use is calculation option using the Stewart Model in units of mmL/L in the <<ENFOQUE FISICOQUÍMICO>> module, in which it is possible to modify the concentrations of the different entry variables and observe the changes they produce in pH.
Parameters | A | B | C |
input | normal (mmol/L) | normal (mEq/L) | acidosis (mEq/L) |
Na^{+} | 142 ± 2 | 142 | 130 |
K^{+} | 4.1 ± 0.3 | 3.9 | 3.5 |
Ca^{++} | 2.3 ± 0.1 | 4.6 | 4.4 |
Mg^{++} | 0.8 ± 0.05 | 1.6 | 1.8 |
Cl^{-} | 106 ± 2 | 106 | 107 |
PO_{4} | 1 ± 0.2 | 1.1 | 1.5 |
Alb (g/L) | 44 ± 3 | 4.4 | 2 (mg/dL) |
pH | 7.422 ± 0.015 | 7.4 | 7.36 |
PCO_{2}(mmHg) | 38 ± 1.5 | 39 | 30 |
Lactate | 1 | 1 | 1.5 |
Parameters | A | A | B | C | C |
output | article | program | program | article | program |
HCO_{3}^{-} | 24.5 ± 0.8 | 23.15 | 24 | 8 | 7 |
AG | 16 ± 2 | 16.34 | 15.9 | 20 | 21 |
BE | 0.3 ± 0.5 | -0.3 | -0.4 | -20 | -21 |
SID | 39 ± 1 | 38.24 | 38.01 | — | 25 |
SIG | — | 0.83 | 2.09 | 9.2 | 9.24 |
Example of use
Vomiting, gastric suction, and draining for gastrostomy cause high levels of water, electrolyte and hydrochloric acid loss. The immediate effect of such losses is seen in isotonic dehydration and metabolic alkalosis. One quick example of this comes when pH is increased after the concentration of Cl^{-} is decreased to 96 mmL/L. Figure 8 shows the results.
Fig. 8. Simulation of a patient experiencing a Cl^{-} loss which leads to metabolic alkalosis.
In these conditions, the pH was calculated at 7.54, which indicates metabolic alkalosis. The user can effect various combinations in changing the concentration of the entry variables and simulate a great diversity of clinical cases.
DISCUSSION
Doctor has very few options available to support them in the calculation of acid-base imbalances. As has been mentioned, there are only two programs available on the internet based on the physicochemical method: (1) A teaching website developed by Figge and (2) a program on which the calculation can be carried out, which is not always available. Di Iorio et al. [21] have reported a rule for the calculation of pH that uses the classic method and produces a preliminary diagnostic. There is also an Excel spreadsheet which basically serves as an archiving tool in which the patient’s clinical history and laboratory results can be noted, and in which the calculation of [H^{+}] is based on the use of a table of equivalence between blood pH and [H^{+}]; however, the principal intention behind the spreadsheet is the systemization of data. This study outlines the implementation of a computer program that allows for the calculation of acid-base through the principal of combining the relevant methods of calculation [20, 25]. In the examples of clinical cases that have been outlined here, it is possible to see how to arrive at a diagnosis of partially compensated chronic respiratory acidosis using the calculation modules, each of which complement and confirm the diagnosis.
With this program, it is possible to choose any of the methods separately or all of them together. In accordance with Kellum [20], it is ultimately more effective to use all the methods together. It is opportune to mention that this program allows for the calculation of the acid-base variables and produces a preliminary diagnosis; however, the definitive diagnosis is the responsibility of the doctor - based on their experience, the data from the clinical history, a physical examination and on the correct laboratory results. In accordance with Huerta-Torrijos et al., some calculations can be used to corroborate the accuracy of laboratory results [7]. Moreover, this program can be used for the teaching of this area through the use of the help windows, the review of the topic option, and through simulations based on the clinical case details the program details. It can also be used as a teaching aid where the help windows permit a quick review. With the teaching module, various clinical cases can be simulated. There is a large amount of clinical case details available on the internet, including laboratory data, and diagnostic and treatment data. The student can enter these details into the program and carry out a simulation of the relevant clinical case.
There are few clinical cases which report the use of the Stewart Model, probably due to the large quantity of data that it requires and the complexities involved in its use. This study used the data provided by Kellum (2005) [20] and compared them with the calculations produced by the program. It should also be noted that the concentrations of Ca^{++} y Mg^{++} used by Kellum [20] were not used in this study. However, the small variations found in the different parameters did not modify the diagnostic interpretation. It should also be noted that the values that this study reports here were confirmed by means of alternative equations and in each case were calculated using every equation - such as those that use different units for phosphate and albumin. The program is able to calculate other variables not reported by Kellum [20].
Conclusions
This study describes the development of a computer program for the study of blood acid-base balance that is easy to operate, combines all the calculation tools available today, and fills the void that exists in computer programs of this type. The program allows for preliminary diagnoses of respiratory or metabolic alkalosis and acidosis to be carried out, and distinguishes whether the condition is acute or chronic. It also can determine whether a compensatory process is in effect, calculate the [H^{+}] for any value of pH with greater precision than the relevant calculation tables, determine which organs are involved in the acid-base imbalance, and calculate the base or acid deficit - depending on the case - in order that blood pH can be restored. The examples used in this study demonstrate that the results calculated by this program are essentially the same as those reported in the bibliography from which the data used by this study were obtained - equally, the program also obtained the same suspected diagnoses as those arrived at in the literature. It is important to emphasize that, in order to arrive at a certain diagnosis, the patient’s clinical history and a physical examination are required. This program should, therefore, be seen as a support tool and not as a medically intelligent diagnostic program. Its use has been envisioned principally to facilitate the mathematic calculations for the doctor. It is advised that the program can be used to teach and update medical students and those studying related degrees on this area of medicine. It is also recommended as a tool for continuous education for medical residents and medical experts in intensive care. In general, while the program is easy to operate and allows for the calculations to be carried out in a straightforward way, it needs to be made clear that it isnot a substitute for a doctor. The program will be able to be ordered at the email address provided.
DISCLAIMER
The Equilibrar program is not a substitute for clinical criteria. No medical decision should be taken solely on the basis of the results given by this program.
ACKNOWLEDGMENTS
We thank the Programa Institucional de Fortalecimiento a la Capacidad Académica 2012 for the support given to this publication. We thank Ben Stewart for English revision.
References
- Gauthier PM, Szerlip HM. “Metabolic acidosis in the intensive care unit”. Crit Care Clin 2002; 18:289-308.
- Kellum JA. “Determinants of blood pH in health and disease”. Crit Care 2000; 4(1):6-14.
- Walmsley RN, White GH. “Mixed acid-base disorders”. Clin Chem 1985; 31(2):321-325.
- Fencl V, Jabor A, Kazda A, Figge J. “Diagnosis of metabolic acid-base disturbances in critically ill patients”. Am J Respir Crit Med 2000; 162:2246-2251.
- Manozzo MB, Cerveira PRC, Kappel RC, Rios SRV. “Acid-base disorders evaluation in critically ill patients: we can improve our diagnostic ability”. Intensive Care Med 2009; 35:1377-1382.
- Siggaard-Andersen O, Siggaard-Andersen M. “The oxygen status algorithm: a computer program for calculating and displaying pH and blood gas data”. Scand J Clin Lab Invest Suppl 1990; 203:29-45.
- Huerta-Torrijos J, Díaz-Barriga RP, Sardiñas-Hernández JJ, Godoy-Vega I. “Análisis sistemático del equilibrio ácido-base en formato automatizado”. Principios básicos y propuesta. Medicina Critica y Terapia Intensiva 2001; 15(3):69-79.
- Adrogue HJ, Gennari FJ, Galla JH, Medias NE. “Assessing acid-base disorders”. Kidney International 2009; 76:1239-1247.
- Siggaard-Anderson O, Fogh-Andersen N. “Base excess or buffer base (strong ion difference) as a measure of a no-respiratory acid-base disturbance”. Acta Anaesthesiol Scand 1995; 107:123-128.
- Stewart PA. “Independent and dependent variables of acid-base control”. Respir Physiol 1978; 33:9-26.
- Stewart PA. “Modern quantitative acid-base chemistry”. Can J Physiol Pharmacol 1983; 61:1441-1461.
- Kellum JA, Elbers PW. Stewart’s textbook of acid-base. 2da ed. AcidBase.org, Amsterdam; 2009.
- Kurtz I, Kraut J, Ornekian V, Nguyen MK. “Acid-base analysis: a critique of the Stewart and bicarbonate-centered approaches”. Am J Physiol Renal Physiol 2008; 294:F1009-F1031.
- Schlichtig R, Grogono AW, Severinghaus JW. “Human PaCO_{2} and standard base excess compensation for acid-base imbalance”. Crit Care Med 1998; 26(7):1173-1179.
- Singer RB, Hastings AB. “An improved clinical method for the estimation of disturbances of the acid-base balance of human blood”. Medicine (Balt) 1948; 27:223-242.
- Stewart PA. “How to understand acid-base”. In: A quantitative acid-base primer for biology and medicine. Edited by Stewart PA, New York: Elsevier 1981; p. 1-286.
- Figge J, Rossling TH, Fencl V. “The role of serum proteins in acid-base equilibria”. J Lab Clin Med 1991; 117:453-467.
- Figge J, Mydosh T, Fencl V. “Serum proteins and acid-base equilibria: a follow-up”. J Lab Clin Med 1992; 120:713-719.
- Watson PD. “Modeling the effects of proteins on pH in plasma”. J Appl Physiol 1999; 86:1421-1427.
- Kellum JA. “Clinical review: Reunification of acid-base physiology”. Crit Care 2005; 9:500-507.
- Di Iorio C, Rufolo L, Melillo EM, Granata A, Melillo G. “The slide rule: a new method for the assessment of acid-base equilibrium disorders”. Minerva Anesthesiol 2007; 73:339-342.
- Emmett MM, Narins RG. “Clinical use of the anion gap”. Medicine (Baltimore) 1977; 56(1):38-54.
- Kraut JA, Medias NE. “Metabolic acidosis: pathophysiology, diagnosis and management”. Nat Rev Nephrol 2010; 6:274-285.
- Morgan TJ. “Clinical review: The meaning of acid-base abnormalities in the intensive care unit - effects of fluid administration”. Critical Care 2005; 9(2):204-211.
- Corey HE. “Bench-to-bedside review: fundamental principles of acid-base physiology”. Critical Care 2005; 9(2):184-192.
- Fidkowski C, Helstrom J. “Diagnosing metabolic acidosis in critically ill: bridging the anion gap, Stewart, and base excess methods”. Can J Anesth 2009; 56:247-256.
- Schück O, Matouovic K. “Relation between pH and the strong ion difference (SID) in body fluid”. Biomed Papers 2005; 149(1):69-73.