Generally, in an epidemic, types and amounts of patients are always unpredictable. Therefore, doctors, medical facilities, and consulting rooms of hospitals needs be redeployed to ensure safety of diagnosing and treating environment. In this sense, a hospital can be considered as a dynamic reconfigurable discrete event system. How to avoid cross-infection among patients in a hospital during a period of epidemic is critical. The current work models the patient visiting process in a hospital by using a work flow net (WF-net), where patients are represented by tokens. On this application background, a new problem named mixed-flow relation in a WF-net is presented, which leads to cross-infection among patients. A detection method of the mixed-flow relation is developed and a mixed-flow avoidance controller is designed accordingly in the work. The effectiveness of the proposed method is illustrated by a group of experiments.