Predictors using atttibutecombooptions

I am trying to build a predictor that uses a #{dataelement-id.catoptioncombo-id.attributeoptioncombo-id} as the generator but it does not appear to generate any values.

I have thoroughly tested this, using both an asterix and the default catcombo-id for the catoptioncombo-id, and it simply generates no results.

Can someone confirm whether predictors are able to this format as a source for a predictor? I know it works fine with category option combinations, seems odd that it doesn’t with attribute option combos.

If the answer is no then I will need to separate this dataset into discrete datasets which is not ideal.

Hello @HaydnJ,

Unfortunately predictors do not yet accept attributeoptioncombo-id as part of the generator expression syntax. Predictors currently handle attribute option combos like this:

  • For each attribute option combo (AOC) in which any generator expression data value is found, the generator expression is evaluated using input values from that AOC. The result of that expression is stored in the output data element using that AOC.

This allows independent predictions to be made for each AOC. For example, if the AOC represents a combination of partner and project, then a prediction will be made for each combination of partner and project where data is found, and stored in the output data element for that combination of partner and project.

I suppose that in the future predictors could also support the AOC-id in the generator expression, take that value, and store the result in the output data element with the system default AOC. Is this what you need? (Note that there is currently no way of explicitly specifying an output AOC.)

If this is what you need, I would be sympathetic to implementing this and I would encourage you to write a Jira ticket for it. As always, please be as descriptive as you can be about what your use case is for this. This helps us prioritize feature requests and make sure that we understand them correctly.

2 Likes

Hi Jim.

Thank you for the confirmation. I think for now I will work around the issue.

This is a really odd use case, but the idea is that we have a large dataset of NTD data from ESPEN, but then we have the need to supersede the data in that dataset with programmatic data, without overwriting the ESPEN data. It might be, for example, that we have more accurate information for the number of treatments given in a particular IU. The predictor then runs through each data element and merges them into a merged dataset, prioritising the programmatic data over the ESPEN data.

I can’t achieve this behaviour with indicators because of the way it aggregates up the IU hierarchy and so predictors are the only way forward.

For my workaround I have made three identical sets of Data Elements for ESPEN, Programmatic and Merged. The Predictor now uses ESPEN and Programmatic data elements as the source and writes to the merged data elements.

It’s a bit heavy handed but it works.