How to Describe Multiple Origins for a Value in Define-XML 2

//How to Describe Multiple Origins for a Value in Define-XML 2

How to Describe Multiple Origins for a Value in Define-XML 2.

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.

What if you need to deal a 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”. However this isn’t possible in Define-XML 2, so how should you deal with this case?


Where Clauses

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’s an example:


Where Clause code example - two values with same name


“VS.VSORRES.TEMP.EDT” is the Value that comes from eDT. A Where Clause is needed to define how we know the value is from eDT. For example saying the Value applies “WHEN TESTCD=TEMP AND VSNAM=VENDOR_A”:


Where Clause code example - value from eDT


“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:


Where Clause code Example - value from CRF


These Where Clauses are then linked to the Variables in the Domain:


Where Clause code example - linked to domain variables


Using this mechanism 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.


Related posts you might be interested in