Qualitatively, the software, for example written in C, can look for an instantaneous change in gas flow direction from ???towards the patient??? to ???away from the patient??? (a falling zero flow crossing) and/or a peak pressure value, to positively identify PLI, for example during positive pressure ventilation (PPV).