Program indicator to count defaulters

Hi,
We will like to count TEIs defaulted i.e. that did not have any visit (event) after 30 days of a ‘Next appointment date’ (DE). We will like to stop counting the TEI once there is a visit anytime thereafter.
e.g. Mr A had next appointment date 29th of Feb. He did not show up on 29th of Feb nor in March or April. However he showed up in May. So Mr A should be counted in March and April but not in May.
Does anyone know how this can be achieved with program indicators?
Thanks in advance.