It’s really simple. Lets say we have three groups of data elements for a given period,orgunit and attribute option. Two are empty, while one is not.

foo<-c(1,2,3)
bar<-c()
baz<-c(4,5,6)

foo and baz have data which has been entered, while for the set of bar data elements, no data has been entered. When testing for “Exclusive pairs”, we wish to determine if data has been entered for the “left side”, then not data should exist on the “right side”. It’s simple, we just test if the length of the array of values is greater than zero and OR both sides

This would be a pass.

length(foo)==0 | length(bar)==0
## [1] TRUE

This would be a failure.

length(foo)==0 | length(baz)==0
## [1] FALSE

For “Compulsory pairs”, we would be looking for if data has been entered on the “left side” as well as the “right side”.

This would be a pass.

length(foo)>0 & length(baz)>0
## [1] TRUE

This would be a failure.

length(foo)>0 & length(bar)>0
## [1] FALSE

It is suggested thus to introduce new functionality in the core to

  1. Allow assembling data element + catcombos into an array.
  2. A function to determine the length of the array.
  3. A new function (“Exclusive pairs”) in addition to the “Compulsory pairs” which exists to allow for these operations.