The measurement of patients’ dosages of radiation caused by medical diagnostics continues to be challenging. A Cantor sequence photonic crystal structure using porous silicon doped with a polymer of polyvinyl alcohol, carbol fuchsin and crystal violet (DPV) is proposed. The influence rules of geometrical and optical parameters such as the radiation doses, number of periods, porosity of porous layers, incident angle and thickness of layers are investigated using MATLAB based on the transfer matrix method. The transmittance of the Cantor sequence of a defective photonic crystal sensor under different conditions is investigated to select the optimum conditions. The proposed system recorded the accepted sensitivity of 0.265[Formula: see text]nm/Gy, FoM of 6.5[Formula: see text]Gy[Formula: see text], Q of 12,701, RS of [Formula: see text] and LoD of [Formula: see text] for gamma radiation. The suggested detector has simple design, accurate monitoring efficiency and immense potential for gamma radiation sensing.