OEModule\OphCoCvi\models\Element_OphCoCvi_ClericalInfo::getPatientFactorAnswer PHP Method

getPatientFactorAnswer() public method

public getPatientFactorAnswer ( OphCoCvi_ClericalInfo_PatientFactor $factor ) : OphCoCvi_ClericalInfo_PatientFactor_Answer | null
$factor OphCoCvi_ClericalInfo_PatientFactor
return OphCoCvi_ClericalInfo_PatientFactor_Answer | null
    public function getPatientFactorAnswer(OphCoCvi_ClericalInfo_PatientFactor $factor)
    {
        foreach ($this->patient_factor_answers as $answer) {
            if ($answer->patient_factor_id == $factor->id) {
                return $answer;
            }
        }
        return null;
    }