It's interesting problem.I tried to see if you patient is breathing ,
and it seems like he takes 28 breathes per minute. (After it I have seen that I am breathing 21 times bpm,so may
be the patient was a little excited).Anyway,attached here very simple VI.To solve the whole problem,probably something
more complicated should be used.