The real-time monitoring of physical and chemical parameters in running fluids is of importance for biomedical, biochemical, and environmental applications, such as the presence of biomarkers or chemomarkers, or the departure from some preset values of critical parameters. In this contribution we present a new generation of Permeable Diffractive Optical Elements (PDOE) based on photon sieves. In brief, the PDOE is made of passing holes properly placed on specific locations on a rigid surface. This arrangement makes PDOEs ideal to work with running fluids. Our PDOE is optimized maximizing the irradiance at is focal plane, maintaining an appropriate permeability ratio. The starting point is the classical Fresnel zone distribution. We have used two different optimization strategies to design a working PDOE: i) Particle Swarm Optimization has been applied to modify the distribution of holes on the PDOE simultaneously considering all of them; ii) an iterative minimization algorithm adding one hole at the time until filling the PDOE aperture. Both optimization algorithms generate focal spots that are compared to choose the design better suited for the proposed application. Once the PDOE is optimized and fabricated, the surface of the remaining rigid structure is nanostructured (for example using Laser Induced Periodic Surface Structures), or functionalized, to provide specific sensing capabilities. In addition, the PDOE is integrated within a pipe where the fluid under analysis circulates through. A proposal for the optoelectronic assembly of the device-including auxiliary optical elements, light sources, and detectors - is also presented in this contribution.