<% ' Set Initial Conditions QueryForm = Request.ServerVariables("PATH_INFO") FiO2 = "" ' Did the user press a SUBMIT button to execute the form? If so get the form variables. if Request.ServerVariables("REQUEST_METHOD") = "POST" then FiO2 = Request.Form("FiO2") PaO2 = Request.Form("PaO2") PaCO2 = Request.Form("PaCO2") NewQuery = TRUE end if %>
  The equation used to calculate the Arterial/Alveolar Oxygen Tension Ratio:
  a/A PO2 = PaO2/PAO2
                            PaCO2                  (1-R)
  where PAO2 = 713 x FiO2 - ----- + PaCO2 x FiO2 x -----
                              R                      R
  where R (the respiratory gas exchange ratio)
  Reference:
  J.B. West, M.D. Ph.D., Respiratory Physiology 3rd Edition
  Appendix, page 165
  

FiO2: (Room Air=0.21, 100%=1.0)

PaO2 from ABG:

PaCO2 from ABG:


<% if NewQuery then resultPaO2 = (713*FiO2) - (PaCO2/0.8) + (PaCO2*FiO2*(1-0.8)/.8) ratio = PaO2/resultPaO2 Response.Write "PAO2= " + CStr(Round(resultPaO2,1)) + "
" Response.Write "Ratio is: " + CStr(Round(ratio,3)) + "
" end if %>