In this paper, we propose a two-layer heterogeneous network to realize the remote monitoring and advanced warning for infectious diseases spread by airborne pathogens, whose detection can be considered as a binary detection problem. To intuitively study the detection process, we abstract it as a molecular communication via diffusion (MCvD) model and uncover that one of the key factors to impact the detection performance is inter-symbol interference (ISI), i.e., the viral aerosol from other biological entities. Therefore, overcoming ISI is imperative to ensure reliable detection. In the abstracted MCvD model, the detection performance can be described by the bit error rate (BER) performance. Following this assumption, we propose to optimize the detection interval to minimize the impact of ISI while ensuring the accurate detection of the transmitted information symbol, which is suitable for both the absorbing and passive receivers. For tractability, based on the signal-to-interference difference (SID) and signal-to-interference-and-noise amplitude ratio (SINAR), we design a modified-SINAR (mSINAR) to measure BER performance for the MCvD system with a variable detection interval. Besides, we derive the optimal detection interval in closed-form. Using simulation results, we show that in terms of BER, our proposed mSINAR scheme is superior to the competitive schemes, and performs similarly to the scheme with optimal intervals determined by the exhaustive search.