Illness is by the far the most common reason why children miss school, but all absences are included, even those that have been agreed as genuinely unavoidable. The PA system is intended to identify children whose absences are 'persistent' over time, but it will also catch those who have one long illness but have attended full-time for the rest of the year. Schools need to be careful not to send out computer-generated letters in every case where the pupil is currently below the threshold. This will only cause irritation to parents who have already had all their child's absences accepted as entirely reasonable, as in this example.
On the specific issue of children who need to make regular visits to hospital as an in-patient, it may be possible to class at least some of the missing sessions as an attendance rather than an authorised absence. If the child undertakes some supervised work through a hospital tuition service (not just doing work provided by the school under the supervision of a parent), that half-day can be classed as an 'approved educational activity' (Code B) and counted as present. It does not need to be for the whole morning or afternoon as long as it can be evidenced that some supervised learning has taken place. If the child is actually enrolled in a hospital 'school' (with its own DfE number), this can be classed as 'dual registration' and the home school can mark a Code D in their register, which discounts the whole period involved from the child's attendance record as it is being recorded elsewhere for those sessions.