This article presents a mathematical model construction approach for functioning systems. To perform functioning system analyses with the goal to establish correct work conditions, heuristical problem solving way and mathematical modeling can be used. Topological modeling is an effective tool to develop mathematical models for heterogeneous systems when the available information is insufficient. Within this article, the authors provide a theoretical background and introduce topological model elements, functions, features, and construction phases. A practical model construction process is adapted to be used for medicine tasks. A topological model for multiple diseases is developed. It is used as a mechanism to model the course of a disease and the effect of the applied therapy. Using the proposed criteria for evaluating the chosen therapy and multi-objective optimization techniques make it possible to prescribe the optimal therapy complex for an individual patient.