I am using the following script to load my data. The query runs ok in Server, but the load script always give me 'Field not found <EncounterAge>' error. It looks like the renamed or calculated fields cannot be used in load script. Is this true? If yes, what is the solution?
if(BMI<=18.5, 'Underweight', if(BMI<=24.9, 'Normal', if(BMI<=29.9, 'Overweight', 'Obesity'))) as BMI2,
if(BP_SYSTOLIC<140, '<140', '>=140') as Systolic,
if(BP_DIASTOLIC<90, '<90', '>=90') as Diastolic,
if(EncounterAge<45, '0-44', if(EncounterAge<65, '45-64',if(EncounterAge<75, '65-74', '75+'))) as Age2