In [37]:
def calculate_values(Vt, f, Vd, PACO2, PaO2):
R = 0.8 # constant
Ve = Vt * f
Va = (Vt - Vd) * f
PAO2 = 150 - (PACO2/R)
Aagap = PAO2 - PaO2
return (Ve / 1000.0, Va / 1000.0, PAO2, Aagap)
In [93]:
def print_info(Vt, f, Vd, PACO2, PaO2, SaO2100, DLCO):
(Ve, Va, PAO2, Aagap) = calculate_values(Vt, f, Vd, PACO2, PaO2)
if Aagap < 15:
print "No A-a gap - ventilation problem"
if Ve > 6.0:
print "Ve (%.2f) is higher than normal" % (Ve)
if Va < 4.2:
print "Va (%.2f) is lower than normal" % (Va)
print "*** Increased Vd (dead space) ***"
else:
print "Va (%.2f) is higher than normal" % (Va)
print "*** Hypoxia ***"
else:
print "Low Ve (%f) - Insufficient breathing" % (Ve)
else:
print "A-a gap (%.2f) - distribution problem" % (Aagap)
if SaO2100 < 100:
print "*** Shunt ***"
else:
if DLCO >= 25 and PAO2 > 100:
print "*** V/Q mismatch ***"
else:
print "*** Diffusion limitation ***"
In [95]:
print "CASE 1: Asthma"
print "Quiet breathing"
print_info(600, 16, 160, 38, 95, 100, 38)
print "\nAsthmatic breathing"
print_info(600, 16, 160, 30, 78, 100, 38)
In [96]:
print "CASE 2: Pulmonary hemangioma"
print_info(730, 23, 150, 32, 56, 91, 0)
In [98]:
print "CASE 3: Interstitial Fibrosis"
print_info(430, 20, 150, 34, 52, 100, 6)
In [99]:
print "CASE 4: Obstructive emphysema"
print_info(500, 10, 160, 32, 59, 100, 5.5)
In [100]:
print "Question 3 Quiz"
print_info(370, 24, 270, 62, 57, 100, 30)