I am collecting patient information, and based on a certain criteria (the logic of which I am collecting from the answers of the previous questions the user filled), I need to decide whether there is a need to refer the person to a doctor or not. If the logic is fulfilled, I want to lock the question that asks whether the referral should be done or not (probably by fixing the answer as YES and making READ-ONLY so that user cannot change the answer. If the logic is not met, the referral question remains open and user is free to choose from YES or NO.
How to make READ-ONLY programmable? One idea is to calculate a variable and switch it from NO to YES based on logic. Any other way?