Wednesday, January 11, 2012

SDTM in XML - the metadata

The previous post showed a snippet of ODM-XML that could be used (and is used by a number of vendors) to store SDTM data in an XML format.
Now, we do already have the metadata for this set of SDTM data in XML format: it is the define.xml.
For example for the VS domain we may find:

(P.S. The order of the attributes is unimportant in XML, the browser just lists them in alphabetical order)

I have set Mandatory="Yes" for those variables that are "required", and to "No" for those that are expected or permissible. The reason is that ODM has the rule that a data point MUST have a value when Mandatory="Yes", and because a data point can be null (or absent) in SDTM even when the variable is expected, we need to set Mandatory="No" for expected variables. A typical example is VSORRES which can be null if the test was not done.
In my personal opinion, it was a design error in SDTM to have "expected" variables. In my opinion, they should have been called "conditionally required", and the rules should have been stated.
But I must also admit that also ODM does not have a good construct for "conditionally required" data points.

The careful reader will already have noticed that the SDTM data in XML format in the previous post do not have an entry for VSSTAT and VSREASND.
There is a very good reason for that: in ODM, only the data points for which there is a value are listed within an "ItemGroupData". Only when one explicitely wants to state that a data point has been set to NULL, one can use the "IsNull" attribute (for further details, see the ODM specification).

One thing I have never liked in define.xml is the "abuse" of the "Name" attribute to keep the SDTM domain name or SDTM variable name (the latter in ItemDef). In ODM the "Name" attribute is used to keep a short description (for display) of the variable, as free text (so not enumerated). This short description is kept in def:Label in define.xml. In my opinion, it shouldn't. That the developers of define.xml have chosen to have an extra (def:Label) attribute is strange, as in ODM, there is already an attribute to keep the domain name, i.e. "Domain" in the case of an ItemGroupDef, and to keep the SDS Variable name, i.e. "SDSVarName" in the case of the SDS/SDTM variable name. So the better solution would e.g. have been:

<ItemGroupDef OID="MyStudy:VS" Name="Vital Signs" Domain="VS" Repeating="Yes">...</ItemGroupDef>

which I think would make more sense, especially as it makes end-to-end easier (less transformations necessary). Probably (but I am not 100% sure) the developers of define.xml did not choose for this solution because "Domain" is not a mandatory attribute in ODM.

No comments:

Post a Comment