<%
' 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
%>
<%
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
%>