Description: SDTM Required variable not found / NULL value in variable marked as Required
Rules FDAC017 and FDAC018 can/must be taken together when using Dataset-XML as the transport format. The reason is that Dataset-XML nicely (as it should) separates data from metadata. SAS-XPT however (a format from the mainframe era) contains some metadata (variable name, label and datatype - but only text or numeric) and all other metadata must be in the define.xml. However "define.xml is leading"!
So, when implementing this rule, we will read the define.xml file, and look for these variables that are marked as "required", i.e. for which the value of the "Mandatory" attribute is "Yes". Then we will look for records in the Dataset-XML for which such a data point is missing.
This of course requires that the "Mandatory" field in the define.xml is correctly implemented, i.e. that for SDTM required variables, the value of the "Mandatory"
attribute is "Yes".
The second approach is that the rule implementation looks up whether the variable is a required variable from the SDTM-IG (version dependent). Unfortunately however, the SDTM-IGs are still published as PDF, which is not machine-readable. Essentially, SHARE should deliver this information by a web service. This feature has not been implemented yet in SHARE, so we developed a RESTful web service "Get whether an SDTM variable is required, expected or permissible", for which you can find the specification here. We will demonstrate such a "web service lookup" in one of the other SDTM rules.
Remark that in Dataset-XML, a record is defined by an "ItemGroupData" element. The record number is provided by the "data:ItemGroupDataSeq" attribute.
The second part of the XQuery comes as:
Courtesy of XML4Pharma - last update: May 2016