There are many common questions people have when creating Define-XML metadata for their datasets. One of these revolves around how to handle data that can come from multiple sources, such as a CRF or eDT. In the simple case you just create a Value List, and specify the Origin on each Value instead of on the Variable.
I was asked yesterday how to deal with the more complicated case where a single Value can come from multiple sources. For example, TEMP may come from the CRF in some cases but eDT in other cases. In Define-XML 1 you can just say Origin="CRF Page 7, eDT", but this is not possible in Define-XML 2, so how should we deal with this case?
The answer is to use "where clauses". These are new in Define-XML 2 and are used to specify when a specific Value definition applies. This usually means one Value for TEMP, one for HR etc, however it can also cover the more complicated case where TEMP can come from multiple places. Simply create two Values with the same Name (though they must still have different OIDs). Here is an example:
"VS.VSORRES.TEMP.EDT" is the Value that comes from eDT. We need a Where Clause to define how we know the value is from eDT, for example saying the Value applies "WHEN TESTCD=TEMP AND VSNAM=VENDOR_A":
"VS.VSORRES.TEMP.CRF" is the Value that defines the CRF originating data. This needs a slightly different Where Clause as shown below. Note "NE" for Not Equal in the Comparator of the second Range Check:
These Where Clauses are then linked to the Variables in the Domain:
Using this mechanism we can provide different metadata for specific tests based on any complex condition. In other words it is not limited to just specifying multiple Origins, it can be used for example to say that a certain unit should be used if the data originates from the US, and a different unit if the data originates from the UK.
I'll leave that one as an exercise for the reader...
Article originally posted on LinkedIN.