call javascript variable within velocityTest expression inside includeif

Hello everyone, i am working on a project that requires redirecting to another page after saving once the patient’s age is greater than 40 and HIV test is reactive. my challenge is how to use getValue(‘testresult.value’) inside velocityTest expression to pull obs data from the from. below is my code for review and assistance.

    <redirectOnSave url="/htmlformentryui/htmlform/$macroCurrentPatientID&amp;visitId=$macroCurrentPatientVisitID&amp;formUuid=$macroRecencyFormUUID&amp;"/>