So the flowchart should go like this:
Mutation in the CFTR gene >>>>>> Production of defective CFTR protein >>>>>> defective CFTR protein in cell membrane or no protein at all >>>>>>> Impaired ion transport across the cells >>>>>>> Cells secrete less chloride >>>>>>> leads to more re-absorption of sodium and water into the cells >>>>>>> decreased hydration of mucus present outside the cells as more water is absorbed into the cells >>>>>>>> thick viscous mucus.