An apparatus includes a computing device that includes a memory configured to store instructions. The computing device also includes a processor to execute the instructions to perform operations that include receiving a signal representative of electrical impedance in a chest of a patient, and, receiving a signal representative of the motion of chest compressions performed on the patient during a cardiopulmonary resuscitation (CPR) treatment. The operations also include processing the received signal representative of the motion of chest compressions to determine one or more characteristics of the motion, and, processing the received signal representative of the electrical impedance to determine parameters relevant to a production of a signal representative of airflow activities of the patient. Operations also include modifying the one or more determined parameters based on the one or more determined characteristics of the motion to produce the signal representative of airflow activities of the patient.