Wolfram Research

Function Repository Resource:

PeakExpiratoryFlow

Source Notebook

Calculate a person's maximum rate of exhalation

Contributed by: Claudio Lobo Chaib Filho

ResourceFunction["PeakExpiratoryFlow"][age,height,gender]

gives the peak rate of exhalation for a person of a particular age,height and gender.

ResourceFunction["PeakExpiratoryFlow"][age,height,gender,prop]

gives the property prop.

Details and Options

Peak expiratory flow is a person's maximum speed of expiration (breathing out air). It measures the airflow through the bronchi and thus the degree of obstruction in the airways.
The age can be given as a Quantity in any unit of time. When a unit is not specified, the interpretation is in years.
The age can be any value between 1 month and 120 years.
The height can be given as a Quantity in any unit of length. When a unit is not specified, the interpretation is in centimeters.
There is no specific range for height. In some cases, where the age and height set are not satisfactory for the function, the "LungCapacity" prop will indicate Missing["NotAvailable"].
Gender (gender) can be given as an Entity or String, e.g. Entity["Gender","Male"] or "Female".
The following properties are supported for prop:
"PEF" (default) peak expiratory flow value
"LungCapacity" estimated lung capacity (volume of the lungs)
"Plot" age versus PEF plot
"PropertyAssociation" Association containing all properties
"Plot" gives an age (x axis) versus PEF (y axis) plot, where the normal region (green) is shown along with the typical curve (black dashed). The warning region is displayed in yellow and the medical emergency region is displayed in red.
The "TimeUnit" option can take any unit of time. By default, the time is given in minutes.
The "VolumeUnit" option can take any unit of volume. By default, the volume is given in liters.

Examples

Basic Examples

Calculate the PEF (peak expiratory flow) of a person:

In[1]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[35, "Years"], Quantity[175, "Centimeters"], Entity["Gender", "Male"]]
Out[1]=

Scope

When the function is used with three arguments, the property given is "PEF":

In[2]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[25, "Years"], Quantity[185, "Centimeters"], Entity["Gender", "Female"]]
Out[2]=
In[3]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[25, "Years"], Quantity[185, "Centimeters"], Entity["Gender", "Female"], "PEF"]
Out[3]=

If age and height units are not specified, they are interpreted as years and centimeters:

In[4]:=
ResourceFunction["PeakExpiratoryFlow"][25, 185, "Female"]
Out[4]=

Other units of measurement are accepted in the function input, for example, months and feet:

In[5]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[250, "Months"], Quantity[5.5, "Feet"], "Male"]
Out[5]=

Obtain approximate lung capacity with the fourth argument "LungCapacity":

In[6]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[25, "Years"], Quantity[185, "Centimeters"], "Female", "LungCapacity"]
Out[6]=

Get a plot with the fourth argument "Plot":

In[7]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[25, "Years"], Quantity[185, "Centimeters"], Entity["Gender", "Female"], "Plot"]
Out[7]=

Get all forms of output simultaneously as an Association using "PropertyAssociation":

In[8]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[25, "Years"], Quantity[185, "Centimeters"], "Female", "PropertyAssociation"]
Out[8]=

Options

Get a unit of time other than minutes with the option "TimeUnit":

In[9]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[35, "Years"], Quantity[175, "Centimeters"], Entity["Gender", "Male"], "TimeUnit" -> "Seconds"]
Out[9]=

Get a unit of volume other than liters with the option "VolumeUnit":

In[10]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[35, "Years"], Quantity[175, "Centimeters"], Entity["Gender", "Male"], "VolumeUnit" -> "Centimeters"^3]
Out[10]=

All forms of output inherit the specific units chosen by the options, including the plot:

In[11]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[35, "Years"], Quantity[175, "Centimeters"], Entity["Gender", "Male"], "PropertyAssociation", "VolumeUnit" -> "Milliliters", "TimeUnit" -> "Days"]
Out[11]=

Possible Issues

Even if age is given in a time unit other than years, the x axis of the plot will be in years:

In[12]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[200, "Months"], Quantity[150, "Centimeters"], "Male", "Plot"]
Out[12]=

There is no specific range for height. In some cases, where the age and height set is not satisfactory for the function, the specific output "LungCapacity" will indicate it is missing:

In[13]:=
ResourceFunction["PeakExpiratoryFlow"][Quantity[200, "Months"], Quantity[50, "Centimeters"], Entity["Gender", "Male"], "LungCapacity"]
Out[13]=

Resource History

Related Resources

License Information