Generalized nets in medicine