PMDA SDTM validation rules 2.0 September 2019
Variable must be populated with terms from its CDISC controlled terminology codelist. New terms cannot be added into non-extensible codelists.
3.1.2
3.1.3
3.2
ALL
0]//odm:ItemGroupData
let $recnum := $record/@data:ItemGroupDataSeq
(: iterate over those variable data that have a non-extensible codelist :)
for $datapoint in $record/odm:ItemData[functx:is-value-in-sequence(@ItemOID,$itemdefoidsnonextensiblecodelist) = true()]
let $itemoid := $datapoint/@ItemOID
(: pick up the CodeList NCI code :)
let $codelistoid := $definedoc//odm:ItemDef[@OID=$itemoid]/odm:CodeListRef/@CodeListOID
let $codelistncicode := $definedoc//odm:CodeList[@OID=$codelistoid]/odm:Alias[@Context="nci:ExtCodeID"]/@Name
(: get the value of the data point :)
let $value := $datapoint/@Value
(: get the original name of the variable :)
let $varname := $definedoc//odm:ItemDef[@OID=$itemoid]/@Name
(: now check whether the value is in the non-extensible codelist :)
(: the first method for this would be to check in the define.xml CodeList element,
but this cannot be trusted for 100%, as people could have added terms to it,
so we use another web service:
http://www.xml4pharmaserver.com:8080/CDISCCTService2/rest/ValidValueInCodeListNCICode/SDTM/{codedvalue}/{codelistncicode}/{cdisctctversion}
:)
(: replace blanks in variable value by %20 :)
let $valuenew := replace($value,'\s+','%20')
let $valuenew := replace($valuenew,'/','%2F')
let $validvaluerequest := concat($webservicevalidvaluebase,$valuenew,'/',$codelistncicode,'/',$cdisctctversion,'.xml')
(: submit the request and get the answer which can have the string value 'true' or 'false' :)
let $isvalidvalue := data(doc($validvaluerequest)/XML4PharmaServerWebServiceResponse/Response)
where $isvalidvalue = 'false'
return Value '{data($value)}' is not a valid value in the non-extensible codelist with NCI Code {data($codelistncicode)} for codelist version {data($cdisctctversion)}
]]>
Variable must be populated with terms from its CDISC controlled terminology codelist. New terms cannot be added into non-extensible codelists.
3.1.2
3.1.3
3.2
ALL
Value '{data($codedvalue)}' is not a valid value in the non-extensible codelist with NCI Code {data($codelistncicode)} for codelist version {data($cdisctctversion)}
]]>
Variable should be populated with terms from its CDISC controlled terminology codelist. New terms can be added as long as they are not duplicates, synonyms or subsets of existing standard terms.
3.1.2
3.1.3
3.2
ALL
{data($codelistoids)} :)
(: iterate over all datasets :)
for $itemgroupdef in $definedoc//odm:ItemGroupDef[@Name='CM']
let $name := $itemgroupdef/@Name
let $domain := $itemgroupdef/@Domain
(: get the physical location of the datasets :)
let $datasetlocation := (
if($defineversion='2.1') then $itemgroupdef/def21:leaf/@xlink:href
else $itemgroupdef/def:leaf/@xlink:href
)
let $datasetdoc := (
if($datasetlocation) then doc(concat($base,$datasetlocation))
else ()
)
(: Get all the variables by OID for this dataset that DO have a CodeList attached :)
let $variableswithcodelistoids := (
for $itemoid in $itemgroupdef/odm:ItemRef/@ItemOID
where count($definedoc//odm:ItemDef[@OID=$itemoid]/odm:CodeListRef) > 0
return $itemoid
)
(: return {data($variableswithcodelistoids)} :)
(: iterate over all the records in the dataset,
but ONLY if at least one of the variables has a CodeList attached. Otherwise: skip the dataset :)
for $record in $datasetdoc[count($variableswithcodelistoids)>0]//odm:ItemGroupData
let $recnum := $record/@data:ItemGroupDataSeq
(: iterate over all datapoints in the record for which the variable has a codelist attached :)
for $datapoint in $record/odm:ItemData[functx:is-value-in-sequence(@ItemOID,$variableswithcodelistoids)]
(: get the OID and value and the variable name :)
let $itemoid := $datapoint/@ItemOID
let $value := $datapoint/@Value
let $varname := $definedoc//odm:ItemDef[@OID=$itemoid]/@Name
(: return {data($itemoid)} - {data($value)} :)
(: get the CodeList for this variable :)
let $codelistoid := $definedoc//odm:ItemDef[@OID=$itemoid]/odm:CodeListRef/@CodeListOID
(: and check whether the value is in that codelist, when not give a warning :)
(: not that we need to exclude external codelists as these cannot (yet) be checked :)
where count($definedoc//odm:CodeList[@OID=$codelistoid][odm:EnumeratedItem[@CodedValue=$value] or odm:CodeListItem[@CodedValue=$value]])=0 and not($definedoc//odm:CodeList[@OID=$codelistoid]/odm:ExternalCodeList)
return Value '{data($value)}' is a coded value but cannot be found in codelist {data($codelistoid)} in the define.xml
]]>
Paired variables such as TEST/TESTCD must be populated using terms with the same Codelist Code value in CDISC control terminology. There is one-to-one relationship between paired variable values defined in CDISC control terminology by Codelist Code value.
3.1.2
3.1.3
3.2
ALL
Rule cannot be checked as it is completely unclear what the rule means
]]>
Variable must be populated with terms from its CDISC controlled terminology codelist, when its value level condition is met. New terms cannot be added into non-extensible codelists.
3.1.2
3.1.3
3.2
QS
TS
{data($datasetname)} - {data($testcdoid)} - {data($testoid)} :)
for $record in $datasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$testcdoid] and odm:ItemData[@ItemOID=$testoid]]
let $recnum := $record/@data:ItemGroupDataSeq
(: get the value of TESTCD and TEST (or TSPARMCD and TSPARM) :)
let $testcdvalue := $record/odm:ItemData[@ItemOID=$testcdoid]/@Value
let $testvalue := $record/odm:ItemData[@ItemOID=$testoid]/@Value
(: and get the NCI code for as well the test code as the test value from the define.xml :)
let $ncicodetestcdvalue := doc(concat($base,$define))//odm:CodeList[@OID=$testcdcodelistoid]/*[(name()='CodeListItem' or name()='EnumeratedItem') and @CodedValue=$testcdvalue]/odm:Alias[@Context='nci:ExtCodeID']/@Name
let $ncicodetestvalue := doc(concat($base,$define))//odm:CodeList[@OID=$testcodelistoid]/*[(name()='CodeListItem' or name()='EnumeratedItem') and @CodedValue=$testvalue]/odm:Alias[@Context='nci:ExtCodeID']/@Name
(: we only report an error when both the NCI codes were found, but are different :)
where $ncicodetestcdvalue and $ncicodetestvalue and not($ncicodetestcdvalue=$ncicodetestvalue)
return
{data($testcdname)} and {data($testname)} do not have the same NCI code in CDISC CT. '{data($testcdvalue)}' in codelist {data($testcdcodelistoid)} has NCI code {data($ncicodetestcdvalue)} whereas '{data($testvalue)}' in codelist {data($testcodelistoid)} has NCI code {data($ncicodetestvalue)}
]]>
Variable must be populated with terms from its CDISC controlled terminology codelist, when its value level condition is met. New terms cannot be added into non-extensible codelists.
3.1.2
3.1.3
3.2
QS
{data($codelistoids)} :)
(: iterate over all datasets :)
for $itemgroupdef in $definedoc//odm:ItemGroupDef[@Name='TS']
let $name := $itemgroupdef/@Name
let $domain := $itemgroupdef/@Domain
(: get the physical location of the dataset :)
let $datasetlocation := (
if($defineversion='2.1') then $itemgroupdef/def21:leaf/@xlink:href
else $itemgroupdef/def:leaf/@xlink:href
)
let $datasetdoc := (
if($datasetlocation) then doc(concat($base,$datasetlocation))
else ()
)
(: Get the OID for TSPARMCD and TSVAL :)
let $tsparmcdoid := (
for $a in $definedoc//odm:ItemDef[@Name='TSPARMCD']/@OID
where $a = $itemgroupdef/odm:ItemRef/@ItemOID
return $a
)
let $tsvalcdoid := (
for $a in $definedoc//odm:ItemDef[@Name='TSVAL']/@OID
where $a = $itemgroupdef/odm:ItemRef/@ItemOID
return $a
)
(: we will need the OID of the valuelist for TSVAL :)
let $tsvalvaluelistoid := $definedoc//odm:ItemDef[@OID=$tsvalcdoid]/def:ValueListRef/ValueListOID
(: iterate over all records in the TS dataset :)
for $record in $datasetdoc//odm:ItemGroupData
let $recnum := $record/data:ItemGroupDataSeq
(: get the value of TSPARMCD and TSVAL :)
let $tsparmcdvalue := $record/odm:ItemData[@ItemOID=$tsparmcdoid]/@Value
let $tsvalvalue := $record/odm:ItemData[@ItemOID=$tsvalcdoid]/@Value
(: return {data($tsparmcdvalue)} - {data($tsvalvalue)} :)
(: get the allowed coded values for this specific TSPARMCD value :)
(: TODO shouldn't we do this over a def:WhereClauseDef :)
let $parmcdvalueitemdef := $definedoc//odm:ItemDef[@Name=$tsparmcdvalue]
let $parmcdvaluecodelistoid := $parmcdvalueitemdef/odm:CodeListRef/@CodeListOID
(: and get the coded values for this parameter :)
let $allowedparmvalues := (
for $val in $definedoc//odm:CodeList[@OID=$parmcdvaluecodelistoid]/odm:*/@CodedValue
return $val
)
(: $allowedparmvalues now contains all allowed value for TSVAL for the specific TSPARMCD value :)
(: when TSPARMCD is SEXPOP, ADDON, RANDOM, check the value against the valuelist codelist.
return a "reject" when the TSVAL value is NOT in the list of allowed values :)
where ($tsparmcdvalue='SEXPOP' or $tsparmcdvalue='ADDON' or $tsparmcdvalue='RANDOM') and
count($allowedparmvalues) > 0 and
not(functx:is-value-in-sequence($tsvalvalue,$allowedparmvalues))
return Value '{data($tsvalvalue)}' is not a valid value for TSPARMCD='{data($tsparmcdvalue)}'
]]>
Variable should be populated with terms from its CDISC controlled terminology codelist, when its value level condition is met - New terms can be added as long as they are not duplicates, synonyms or subsets of existing standard terms.
3.1.2
3.1.3
3.2
DS
SC
TS
VS
= ')
let $comparator := replace($comparator,'LE',' <= ')
let $comparator := replace($comparator,'GT',' > ')
let $comparator := replace($comparator,'LT',' < ')
let $comparator := replace($comparator,'IN', ' functx:is-value-in-sequence(@Value,')
let $comparator := replace($comparator,'NOTIN',' not(functx:is-value-in-sequence(@Value,')
let $cond :=
if($rangecheck/@Comparator != 'IN' and $rangecheck/@Comparator != 'NOTIN') then
concat('../odm:ItemData[@ItemOID=',$quote,$itemoid,$quote,' and @Value',$comparator,$checkvalue,']',' and ')
(: case 'IN' and 'NOTIN' :)
else concat('../odm:ItemData[@ItemOID=',$quote,$itemoid,$quote,' and ',$comparator,$checkvalue,')]',' and ')
return $cond
)
(: concatenate the individual checks :)
let $condition := string-join($checks)
(: remove the ' and ' at the end of the combined condition :)
let $condition := substring($condition,1,string-length($condition)-5)
return $condition
} ;
(: the define.xml file :)
(: let $base := '/db/fda_submissions/cdisc01/' :)
(: let $define := 'define2-0-0-example-sdtm.xml' :)
(: iterate over all DS, SC, TS and VS domains :)
let $definedoc := doc(concat($base,$define))
for $itemgroupdef in $definedoc//odm:ItemGroupDef[@Name='DS' or @Name='SC' or @Name='TS' or starts-with(@Name,'VS') or @Domain='TS']
let $name := $itemgroupdef/@Name
(: get all the variables for this dataset that DO have a valuelist attached (from the define.xml) - get the OID :)
let $valuelistvariableoids := (
for $a in $itemgroupdef/../odm:ItemDef[def:ValueListRef]/@OID
where $a = $itemgroupdef/odm:ItemRef/@ItemOID
return $a
)
(: get the dataset location :)
let $datasetlocation := (
if($defineversion='2.1') then $itemgroupdef/def21:leaf/@xlink:href
else $itemgroupdef/def:leaf/@xlink:href
)
let $datasetdoc := (
if($datasetlocation) then doc(concat($base,$datasetlocation))
else ()
)
(: iterate over all records in the dataset, when there is at least 1 Valuelist variable :)
for $record in $datasetdoc[count($valuelistvariableoids)>0]//odm:ItemGroupData
let $recnum := $record/data:ItemGroupDataSeq
(: iterate over all data points for which there is a ValueList :)
for $datapoint in $record/odm:ItemData[functx:is-value-in-sequence(@ItemOID,$valuelistvariableoids)]
(: get the OID and value itself :)
let $value := $datapoint/@Value
let $itemoid := $datapoint/@ItemOID
let $itemname := $definedoc//odm:ItemDef[@OID=$itemoid]/@Name
(: get the corresponding def:ValueList from the define.xml :)
let $valuelistoid := $definedoc//odm:ItemDef[@OID=$itemoid]/def:ValueListRef/@ValueListOID
(: we need to find which value-level ItemDef is applicable to the current value :)
let $valuelistitemoid := (
for $itemref in $definedoc//def:ValueListDef[@OID=$valuelistoid]/odm:ItemRef[def:WhereClauseRef/@WhereClauseOID]
let $whereclauseoid := $itemref/def:WhereClauseRef/@WhereClauseOID
let $whereclausedef := $definedoc//def:WhereClauseDef[@OID=$whereclauseoid]
(: translate the def:WhereClauseDef into an XQuery -
the result of the function whereclause-to-xquery-condition is astring like:
../odm:ItemData[@ItemOID="IT.TS.TSPARMCD" and @Value = "ADDON"]
:)
let $condition := functx:whereclause-to-xquery-condition($whereclausedef)
(: the condition requires a context :)
let $condition := concat('$datapoint/',$condition)
(: if there is an ' and ../' in the condition, we also must add the condition :)
let $condition := replace($condition,' and ../',' and \$datapoint/../')
(: util:eval evaluates the condition: when "true" an ItemData element is returned like:
util:eval works in eXist-DB
P.S. for BaseX you might need to use 'xquery:eval'
for MarkLogic you might need to use 'xdmp:eval'
for Saxon, use 'saxon:evaluate'
:)
(: where count(util:eval($condition)) > 0 :) (: for eXist-DB :)
where count(xquery:eval($condition)) > 0 (: for BaseX :)
return $itemref/@ItemOID
)
(: $valuelistitemoid now returns the OID of the valuelevel variable, like IT.TS.TSVAL.ADDON :)
(: get the corresponding valuelist ItemDef :)
let $valuelistitemdef := $definedoc//odm:ItemDef[@OID=$valuelistitemoid]
(: get the referenced CodeList,if any :)
let $valuelistcodelistoid := $valuelistitemdef/odm:CodeListRef/@CodeListOID
let $valuelistcodelist := $definedoc//odm:CodeList[@OID=$valuelistcodelistoid]
(: and get the allowed coded values - this is an array :)
let $valuelistallowedcodevalues := $valuelistcodelist/odm:*/@CodedValue
(: return {data($itemoid)} - {data($value)} - {data($valuelistitemoid)} - {data($valuelistcodelistoid)} - {data($valuelistallowedcodevalues)} :)
(: give an error when there is a CodeList and the valuelevel value is not in the referenced CodeList :)
where count($valuelistitemoid)=1 and count($valuelistallowedcodevalues)>0 and not(functx:is-value-in-sequence($value,$valuelistallowedcodevalues))
return Value '{data($value)}' was not found in valuelevel CodeList {data($valuelistcodelistoid)}
]]>
Variable Name Value and DecodedVariable Name Value must have the same Code in CDISC CT
3.1.2
3.1.3
3.2
QS
{data($datasetname)} - {data($testcdoid)} - {data($testoid)} :)
for $record in $datasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$testcdoid] and odm:ItemData[@ItemOID=$testoid]]
let $recnum := $record/@data:ItemGroupDataSeq
(: get the value of TESTCD and TEST (or TSPARMCD and TSPARM) :)
let $testcdvalue := $record/odm:ItemData[@ItemOID=$testcdoid]/@Value
let $testvalue := $record/odm:ItemData[@ItemOID=$testoid]/@Value
(: and get the NCI code for as well the test code as the test value from the define.xml :)
let $ncicodetestcdvalue := doc(concat($base,$define))//odm:CodeList[@OID=$testcdcodelistoid]/*[(name()='CodeListItem' or name()='EnumeratedItem') and @CodedValue=$testcdvalue]/odm:Alias[@Context='nci:ExtCodeID']/@Name
let $ncicodetestvalue := doc(concat($base,$define))//odm:CodeList[@OID=$testcodelistoid]/*[(name()='CodeListItem' or name()='EnumeratedItem') and @CodedValue=$testvalue]/odm:Alias[@Context='nci:ExtCodeID']/@Name
(: we only report an error when both the NCI codes were found, but are different :)
where $ncicodetestcdvalue and $ncicodetestvalue and not($ncicodetestcdvalue=$ncicodetestvalue)
return
{data($testcdname)} and {data($testname)} do not have the same NCI code in CDISC CT. '{data($testcdvalue)}' in codelist {data($testcdcodelistoid)} has NCI code {data($ncicodetestcdvalue)} whereas '{data($testvalue)}' in codelist {data($testcodelistoid)} has NCI code {data($ncicodetestvalue)}
]]>
Domain table should have at least one record - No records in data source
3.1.2
3.1.3
3.2
ALL
{$numrecords} records found in dataset: {data($datasetname)}
]]>
NULL value in variable marked as Required - Required variables (where Core attribute is 'Req') cannot be NULL for any records
3.1.2
3.1.3
3.2
ALL
No data found for required variable {data($itemname)} in record number {data($recnum)} in dataset {data($datasetname)}
]]>
Required variables (where Core attribute is 'Req') cannot be NULL for any records.
3.1.2
3.1.3
3.2
ALL
{data($datasetname)} - {data($requiredvars)} :)
(: for the current dataset, we do now have all the required variables, by name,
but we do need to the OIDs :)
let $requiredoids := (
for $a in $itemgroup/odm:ItemRef/@ItemOID
where $definedoc//odm:ItemDef[@OID=$a and functx:is-value-in-sequence(@Name,$requiredvars)]
return $a
)
(: iterate over all the records in the dataset :)
for $record in $datasetdoc//odm:ItemGroupData
let $recnum := $record/@data:ItemGroupDataSeq
(: iterate over all required variable OIDs :)
for $varoid in $requiredoids
(: get the name of the variable :)
let $varname := $definedoc//odm:ItemDef[@OID=$varoid]/@Name
(: give a "reject" error when there is no datapoint ('ItemData') for the required variable :)
where not($record/odm:ItemData[@ItemOID=$varoid])
return No data found for required variable {data($varname)} in record number {data($recnum)} in dataset {data($datasetname)}
]]>
Required variables (where Core attribute is 'Req') cannot be NULL for any records.
3.1.2
3.1.3
3.2
ALL
{data($datasetname)} - {data($requiredvars)} :)
(: for the current dataset, we do now have all the required variables, by name,
but we do need to the OIDs :)
let $requiredoids := (
for $a in $itemgroup/odm:ItemRef/@ItemOID
where $definedoc//odm:ItemDef[@OID=$a and functx:is-value-in-sequence(@Name,$requiredvars)]
return $a
)
(: iterate over all the records in the dataset :)
for $record in $datasetdoc//odm:ItemGroupData
let $recnum := $record/@data:ItemGroupDataSeq
(: iterate over all required variable OIDs :)
for $varoid in $requiredoids
(: get the name of the variable :)
let $varname := $definedoc//odm:ItemDef[@OID=$varoid]/@Name
(: give a "reject" error when there is no datapoint ('ItemData') for the required variable :)
where not($record/odm:ItemData[@ItemOID=$varoid])
return No data found for required variable {data($varname)} in record number {data($recnum)} in dataset {data($datasetname)}
]]>
Value of Dates/Time variables (*DTC) must conform to the ISO 8601 international standard.
3.1.2
3.1.3
3.2
ALL
invalid ISO-8601 value for variable {data($itemname)} value = {data($value)} in dataset {data($itemgroupdefname)}
]]>
Duplicate value for --SEQ variable - The value of Sequence Number (--SEQ) variable must be unique for each record within a domain and within each Unique Subject Identifier (USUBJID) or Pool Identifier (POOLID) variables value
3.1.2
3.1.3
3.2
ALL
1
return The record with USUBJID = {data($usubjid)} and {data($seqname)} is not unique in the dataset {data($itemgroupname)}. The following records have the same combination of USUBJID and {data($seqname)}: records number {data($recnums)}
]]>
No baseline result in Domain for subject - All subjects should have at least one baseline observation (--BLFL = 'Y') in EG, LB, MB, MS, PC and VS domains, except for subjects who failed screening (ARMCD = 'SCRNFAIL') or were not fully assigned to an Arm (ARMCD = 'NOTASSGN') or were not treated (ACTARMCD = 'NOTTRT')
3.1.2
3.1.3
3.2
EG
LB
MB
MS
PC
VS
{data($domain)} - {data($blfloid)} :)
(: iterate over all the randomized subjects and count the number of baseline flag records
over all the datasets within that domain :)
(: TOD: for Define-XML 2.1: "HasNoData" dataset :)
for $subject in $randomizedsubjects
let $count := count(
for $dataset in $datasetslocationsindomain
let $c := doc($dataset)//odm:ItemGroupData[odm:ItemData[@ItemOID=$usubjidoid][@Value=$subject] and odm:ItemData[@ItemOID=$blfloid]]/@data:ItemGroupDataSeq
(: return {data($dataset)} - {data($subject)} - {data($c)} :)
return $c
)
(: $count gives the number of records with a baseline flag for the subject :)
where count($datasets) > 0 and $count = 0 (: no baseline record for this subject found in any of the datasets in this domain :)
return No baseline result in Domain {data($domain)} for subject {data($subject)}
]]>
Value for -DECOD not found in MedDRA dictionary - Value for the Dictionary-Derived Term (-DECOD) variable must be populated using a Preferred Term of the MedDRA dictionary of a version specified in the define.xml (Case-insensitive)
3.1.2
3.1.3
3.2
AE
MH
CE
Value '{data($decodvalue)}' for {data($decodname)} was not found in the MedDRA dictionary
]]>
Value for --DECOD is in incorrect case - Case for the Dictionary-Derived Term (--DECOD) variable must be sentence case using a Preferred Term of the MedDRA dictionary of a version specified in the define.xml (Case-sensitive).
3.1.2
3.1.3
3.2
AE
MH
CE
Value '{data($decodvalue)}' for {data($decodname)} is in incorrect case from the MedDRA dictionary
]]>
No qualifiers set to 'Y', when AE is Serious - When Serious Event (AESER) variable value is 'Y', then at least one of seriousness criteria variables is expected to have value 'Y' (Involves Cancer (AESCAN), Congenital Anomaly or Birth Defect (AESCONG), Persist or Signif Disability/Incapacity (AESDISAB), Results in Death (AESDTH), Requires or Prolongs Hospitalization (AESHOSP), Is Life Threatening (AESLIFE), or Other Medicaly Important Serious Event (AESMIE))
3.1.2
3.1.3
3.2
AE
No qualifiers set to 'Y', when AE is Serious in dataset {data($datasetname)}
]]>
ARM is not 'Screen Failure', when ARMCD equals 'SCRNFAIL', or vice versa - Description of Arm (ARM) must equal 'Screen Failure', when Arm Code (ARMCD) is 'SCRNFAIL', and vice versa
3.1.2
3.1.3
3.2
ALL
ARM is not 'Screen Failure', when ARMCD equals 'SCRNFAIL', or vice versa. ARMCD={data($armcdvalue)} with ARM={data($armvalue)} was found
]]>
--STDY is after --ENDY - Study Day of Start of Event, Exposure or Observation (--STDY) must be less or equal to Study Day of End of Event, Exposure or Observation (--ENDY)
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
FINDINGS
number($endyvalue)
return {data($stdyname)}={data($stdyvalue)} is after {data($endyname)}={data($endyvalue)}
]]>
--STDY is after --ENDY, single dataset or domain - Study Day of Start of Event, Exposure or Observation (--STDY) must be less or equal to Study Day of End of Event, Exposure or Observation (--ENDY)
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
FINDINGS
number($endyvalue)
return {data($stdyname)}={data($stdyvalue)} is after {data($endyname)}={data($endyvalue)}
]]>
--STDTC is after --ENDTC - Start Date/Time of Event, Exposure or Observation (--STDTC) must be less or equal to End Date/Time of Event, Exposure or Observation (--ENDTC)
3.1.2
3.1.3
3.2
ALL
xs:dateTime($endtctestvalue)
return {data($stdtcname)}={data($stdtcvalue)} is after {data($endtcname)}={data($endtcvalue)} in dataset {data($datasetname)}
]]>
--STDTC is after --ENDTC, single dataset or domain - Start Date/Time of Event, Exposure or Observation (--STDTC) must be less or equal to End Date/Time of Event, Exposure or Observation (--ENDTC)
3.1.2
3.1.3
3.2
ALL
xs:dateTime($endtctestvalue)
return {data($stdtcname)}={data($stdtcvalue)} is after {data($endtcname)}={data($endtcvalue)} in dataset {data($datasetname)}
]]>
Negative value for --DOSE - Non-missing Dose (--DOSE) value must be greater than or equal to 0
3.1.2
3.1.3
3.2
INTERVENTIONS
= 0 :)
where $dosevalue and number($dosevalue) < 0
return Negative value for {data($dosename)} in dataset {data($datasetname)}: {data($dosevalue)} was found
]]>
Negative value for --DUR - Non-missing Duration of Event, Exposure or Observation (--DUR) value must be greater than or equal to 0
3.1.2
3.1.3
3.2
ALL
= 0 :)
where $durvalue and starts-with($durvalue,'-') (: a --DUR value is present and it is a -P so negative value :)
return Negative value for {data($durname)} in dataset {data($datasetname)}: {data($durvalue)} was found
]]>
Missing value for --STRESC, when --DRVFL='Y' - Character Result/Finding in Std Format (--STRESC) value should not be NULL, when Derived Flag (--DRVFL) value is 'Y'
3.1.2
3.1.3
3.2
FINDINGS
Missing value for {data($strescname)}, when {data($drvflname)}='Y'
]]>
Missing value for --STRESC, when --DRVFL='Y', single dataset or domain - Character Result/Finding in Std Format (--STRESC) value should not be NULL, when Derived Flag (--DRVFL) value is 'Y'
3.1.2
3.1.3
3.2
FINDINGS
Missing value for {data($strescname)}, when {data($drvflname)}='Y'
]]>
Invalid value for --TEST variable - The value of Name of Measurement, Test or Examination (--TEST) should be no more than 40 characters in length
3.1.2
3.1.3
3.2
FINDINGS
40 characters. The rule is a relict of the ancient XPT format.
ALSO:IETEST is an exception: may be up to 200 characters :)
xquery version "3.0";
declare namespace def = "http://www.cdisc.org/ns/def/v2.0";
declare namespace def21 = "http://www.cdisc.org/ns/def/v2.1";
declare namespace odm="http://www.cdisc.org/ns/odm/v1.3";
declare namespace data="http://www.cdisc.org/ns/Dataset-XML/v1.0";
declare namespace xlink="http://www.w3.org/1999/xlink";
declare namespace xs="http://www.w3.org/2001/XMLSchema";
declare namespace functx = "http://www.functx.com";
(: "declare variable ... external" allows to pass $base and $define from an external programm :)
declare variable $base external;
declare variable $define external;
declare variable $defineversion external;
(: let $base := '/db/fda_submissions/cdisc01/' :)
(: let $define := 'define2-0-0-example-sdtm.xml' :)
let $definedoc := doc(concat($base,$define))
(: iterate over all datasets and variables in the define.xml :)
for $itemgroup in $definedoc//odm:ItemGroupDef[upper-case(@def:Class)='FINDINGS' or upper-case(def21:Class/@Name)='FINDINGS']
let $itemgroupdefname := $itemgroup/@Name
(: Get the @Domain value when present, otherwise the @Name value -
this is for allowing 'splitted' domains, e.g. @Name=QSCG @Domain=QS :)
let $datasetname := $itemgroup/@Name
let $domain := (
if($itemgroup/@Domain != '') then $itemgroup/@Domain
else $itemgroup/@Name
)
(: The --TEST variable is the concatenation of the domain code and 'TEST' :)
let $testvar := concat($domain,'TEST')
(: Get the OID for the --TEST variable :)
let $testoid := (
for $a in $definedoc//odm:ItemDef[@Name=$testvar]/@OID
where $a = $definedoc//odm:ItemGroupDef[@Name=$datasetname]/odm:ItemRef/@ItemOID
return $a
)
(: we of course only look into datasets where there really is a --TEST :)
let $datasetname := (
if($defineversion='2.1') then $itemgroup/def21:leaf/@xlink:href
else $itemgroup//def:leaf/@xlink:href
)
let $datasetdoc := (
if($datasetname) then concat($base,$datasetname)
else ()
)
(: iterate over all the records where there is a --TEST variable :)
for $record in $datasetname//odm:ItemGroupData
(: get the record number :)
let $recnum := $record/@data:ItemGroupDataSeq
(: and get the value of the --TEST variable :)
let $testvalue := $record/odm:ItemData[@ItemOID=$testoid]/@Value
(: when it has more than 40 characters, give an error.
Attention: IETEST is an exception (may be up to 200 characters) :)
where string-length($testvalue) > 40 and not($testvar='IETEST')
return The value for {data($testvar)} has more than 40 characters: '{data($testvalue)}' was found
]]>
Invalid value for --TEST variable, single dataset or domain - The value of Name of Measurement, Test or Examination (--TEST) should be no more than 40 characters in length
3.1.2
3.1.3
3.2
FINDINGS
40 characters. The rule is a relict of the ancient XPT format.
ALSO:IETEST is an exception: may be up to 200 characters :)
xquery version "3.0";
declare namespace def = "http://www.cdisc.org/ns/def/v2.0";
declare namespace def21 = "http://www.cdisc.org/ns/def/v2.1";
declare namespace odm="http://www.cdisc.org/ns/odm/v1.3";
declare namespace data="http://www.cdisc.org/ns/Dataset-XML/v1.0";
declare namespace xlink="http://www.w3.org/1999/xlink";
declare namespace xs="http://www.w3.org/2001/XMLSchema";
declare namespace functx = "http://www.functx.com";
(: "declare variable ... external" allows to pass $base and $define from an external programm :)
declare variable $base external;
declare variable $define external;
declare variable $defineversion external;
declare variable $datasetname external;
(: let $base := '/db/fda_submissions/cdisc01/' :)
(: let $define := 'define2-0-0-example-sdtm.xml' :)
let $definedoc := doc(concat($base,$define))
(: iterate over all datasets and variables in the define.xml :)
for $itemgroup in $definedoc//odm:ItemGroupDef[@Name=$datasetname]
let $itemgroupdefname := $itemgroup/@Name
(: Get the @Domain value when present, otherwise the @Name value -
this is for allowing 'splitted' domains, e.g. @Name=QSCG @Domain=QS :)
let $name := $itemgroup/@Name
let $domain := (
if($itemgroup/@Domain != '') then $itemgroup/@Domain
else substring($itemgroup/@Name,1,2)
)
(: The --TEST variable is the concatenation of the domain code and 'TEST' :)
let $testvar := concat($domain,'TEST')
(: Get the OID for the --TEST variable :)
let $testoid := (
for $a in $definedoc//odm:ItemDef[@Name=$testvar]/@OID
where $a = $definedoc//odm:ItemGroupDef[@Name=$datasetname]/odm:ItemRef/@ItemOID
return $a
)
(: we of course only look into datasets where there really is a --TEST :)
let $dsname := (
if($defineversion='2.1') then $itemgroup/def21:leaf/@xlink:href
else $itemgroup//def:leaf/@xlink:href
)
let $datasetdoc := (
if($dsname) then doc(concat($base,$dsname))
else ()
)
(: iterate over all the records where there is a --TEST variable :)
for $record in $datasetdoc//odm:ItemGroupData
(: get the record number :)
let $recnum := $record/@data:ItemGroupDataSeq
(: and get the value of the --TEST variable :)
let $testvalue := $record/odm:ItemData[@ItemOID=$testoid]/@Value
(: when it has more than 40 characters, give an error.
Attention: IETEST is an exception (may be up to 200 characters) :)
where string-length($testvalue) > 40 and not($testvar='IETEST')
return The value for {data($testvar)} has more than 40 characters: '{data($testvalue)}' was found
]]>
Invalid value for --TESTCD variable - The value of a Short Name of Measurement, Test or Examination (--TESTCD) variable should be limited to 8 characters, cannot start with a number, and cannot contain characters other than letters in upper case, numbers, or underscores
3.1.2
3.1.3
3.2
ALL
8 or functx:is-value-in-sequence($firstchar,$numbers) or not(matches($value,'[A-Z_][A-Z0-9_]*'))
return Invalid value for Short Name of Measurement, Test or Examination (--TESTCD) variable: it should be limited to 8 characters, cannot start with a number, and cannot contain characters other than letters in upper case, numbers, or underscores. Value '{data($value)}' was found for variable {data($testname)} in dataset {data($datasetname)}.
]]>
Invalid value for --TESTCD variable, single dataset or domain - The value of a Short Name of Measurement, Test or Examination (--TESTCD) variable should be limited to 8 characters, cannot start with a number, and cannot contain characters other than letters in upper case, numbers, or underscores
3.1.2
3.1.3
3.2
ALL
8 or functx:is-value-in-sequence($firstchar,$numbers) or not(matches($value,'[A-Z_][A-Z0-9_]*'))
return Invalid value for Short Name of Measurement, Test or Examination (--TESTCD) variable: it should be limited to 8 characters, cannot start with a number, and cannot contain characters other than letters in upper case, numbers, or underscores. Value '{data($value)}' was found for variable {data($testname)} in dataset {data($datasetname)}.
]]>
Invalid value for --PARM variable - The value of Parameter (--PARM) variable should be no more than 40 characters in length
3.1.2
3.1.3
3.2
TS
40 characters. The rule is a relict of the ancient XPT format. :)
xquery version "3.0";
declare namespace def = "http://www.cdisc.org/ns/def/v2.0";
declare namespace def21 = "http://www.cdisc.org/ns/def/v2.1";
declare namespace odm="http://www.cdisc.org/ns/odm/v1.3";
declare namespace data="http://www.cdisc.org/ns/Dataset-XML/v1.0";
declare namespace xlink="http://www.w3.org/1999/xlink";
declare namespace xs="http://www.w3.org/2001/XMLSchema";
declare namespace functx = "http://www.functx.com";
(: "declare variable ... external" allows to pass $base and $define from an external programm :)
declare variable $base external;
declare variable $define external;
declare variable $defineversion external;
(: let $base := '/db/fda_submissions/cdisc01/' :)
(: let $define := 'define2-0-0-example-sdtm.xml' :)
let $definedoc := doc(concat($base,$define))
(: iterate over all TS datasets (there should be only one) :)
for $itemgroup in $definedoc//odm:ItemGroupDef[@Name='TS']
(: Get the OID for the TSPARM variable :)
let $testoid := (
for $a in $definedoc//odm:ItemDef[@Name='TSPARM']/@OID
where $a = $definedoc//odm:ItemGroupDef[@Name='TS']/odm:ItemRef/@ItemOID
return $a
)
(: we of course only look into datasets where there really is a --TEST :)
let $datasetname := (
if($defineversion='2.1') then $itemgroup/def21:leaf/@xlink:href
else $itemgroup//def:leaf/@xlink:href
)
let $datasetdoc := (
if($datasetname) then doc(concat($base,$datasetname))
else ()
)
(: iterate over all the records within the TS dataset :)
for $record in $datasetdoc//odm:ItemGroupData
(: get the record number :)
let $recnum := $record/@data:ItemGroupDataSeq
(: and get the value of the TSPARM variable :)
let $testvalue := $record/odm:ItemData[@ItemOID=$testoid]/@Value
(: when it has more than 40 characters, give an error :)
where string-length($testvalue) > 40
return The value for TSPARM in dataset {data($datasetname)} has more than 40 characters: '{data($testvalue)}' was found
]]>
Invalid value for --PARMCD variable - The value of Parameter Short Name (--PARMCD) variables should be no more than 8 characters in length
3.1.2
3.1.3
3.2
ALL
8
return The value for TSPARMCD in dataset {data($datasetname)} has more than 8 characters: '{data($testvalue)}' was found
]]>
Missing End Time-Point value - One of End Time-Point variables values is expected to be populated when an event or an intervention occurred. (E.g., one of End Date/Time of Event or Intervention (--ENDTC), End Relative to Reference Period (--ENRF), and End Relative to Reference Period (--ENRTPT) variables values should not be missing, or Occurrence (--OCCUR) variable value should be 'N')
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
Missing End Time-Point value in dataset {data($name)} file {data($datasetname)}: One of End Time-Point variables values [{data($endtcname)},{data($enrfname)},{data($enrtptname)}] is expected to be populated except for when {data($occurname)}='N'
]]>
Missing Start Time-Point value - One of Start Time-Point variables values is expected to be populated when an event an intervention occurred. (E.g., one of Start Date/Time of Event or Intervention (--STDTC), Start Relative to Reference Period (--STRF), and Start Relative to Reference Period (--STRTPT) variables values should not be missing, or Occurrence (--OCCUR) variable value should be 'N')
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
Missing Start Time-Point value in dataset {data($name)} file {data($datasetname)}: One of Start Time-Point variables values [{data($stdtcname)},{data($strfname)},{data($strtptname)}] is expected to be populated when an event an intervention occurred except for when {data($occurname)}='N'
]]>
Missing value for --STAT, when --REASND is provided - Completion Status (--STAT) should be set to 'NOT DONE', when Reason Not Done (--REASND) is populated
3.1.2
3.1.3
3.2
ALL
Missing or invalid value for {data($statname)} when {data($reasndname)} is provided - {data($reasndname)}={data($reasndvalue)} - {data($statname)}={data($statvalue)} in dataset {data($datasetname)}
]]>
Missing value for --DTC, when --ENDTC is provided - Date/Time of Collection (--DTC) should not be NULL, when End Date/Time of Observation (--ENDTC) is not NULL
3.1.2
3.1.3
3.2
FINDINGS
Missing value for {data($dtcname)}, when {data($endtcname)} is provided, value={data($endtcvalue)}
]]>
--DTC is after --ENDTC - Date/Time of Specimen Collection (--DTC) must be less or equal to End Date/Time of Specimen Collection (--ENDTC)
3.1.2
3.1.3
3.2
FINDINGS
xs:dateTime($endtctestvalue)
return {data($dtcname)}={data($dtcvalue)} is after {data($endtcname)}={data($endtcvalue)} in dataset {data($datasetname)}
]]>
Missing value for --ORRES, when --ORRESU is provided - Result or Finding in Original Units (--ORRES) should not be NULL, when Original Units (--ORRESU) is provided
3.1.2
3.1.3
3.2
FINDINGS
Missing value for {data($orresname)}, when {data($orresuname)}, value={data($orresuvalue)} is provided in dataset {data($datasetname)}
]]>
Value for --STNRHI is less than value for --STNRLO - Reference Range Upper Limit-Std Units (--STNRHI) value must be greater than or equal to Reference Range Lower Limit-Std Units (--STNRLO) value
3.1.2
3.1.3
3.2
FINDINGS
Value for {data($stnrihname)}, value={data($stnrhivalue)} is less than value for {data($stnrloname)}, value={data($stnrlovalue)}
]]>
Standard Units (--STRESU) should not be NULL, when Character Result/Finding in Std Units (--STRESC) is provided -
3.1.2
3.1.3
3.2
AE
This rule is nonsense!
]]>
Missing value for --STRESC, when --STRESU is provided - Character Result/Finding in Std Units (--STRESC) should not be NULL, when Standard Units (--STRESU) is provided
3.1.2
3.1.3
3.2
FINDINGS
Missing value for {data($strescname)}, when {data($stresuname)} is provided, value={data($stresuvalue)} is provided in dataset {data($datasetname)}
]]>
Missing values for --STDTC, --STRF and --STRTPT, when --ENDTC, --ENRF or --ENRTPT is provided - Start Date/Time of Observation (--STDTC), Start Relative to Reference Period (--STRF) or Start Relative to Reference Time Point (--STRTPT) should not be NULL, when End Date/Time of Observation (--ENDTC), End Relative to Reference Period (--ENRF) or End Relative to Reference Time Period (--ENRTPT) is not NULL
3.1.2
3.1.3
3.2
ALL
Missing values for {data(concat($name,'STDTC'))}, {data(concat($name,'STRF'))} and {data(concat($name,'STRTPT'))}, when one of {data(concat($name,'ENDTC'))}, {data(concat($name,'ENRF'))} or {data(concat($name,'ENRTPT'))} is provided in dataset {data($name)}
]]>
Missing value for --TPT, when --TPTNUM is provided - Planned Time Point Name (--TPT) should not be NULL, when Planned Time Point Number (--TPTNUM) is populated
3.1.2
3.1.3
3.2
ALL
Planned Time Point Name {data($tptname)} should not be NULL, when Planned Time Point Number {data($tptnumname)} is populated, value = {data($tptnumvalue)}
]]>
Missing value for --TPTNUM, when --TPT is provided - Planned Time Point Number (--TPTNUM) should not be NULL, when Planned Time Point Name (--TPT) is populated
3.1.2
3.1.3
3.2
ALL
Planned Time Point Number {data($tptnumname)} should not be NULL, when Planned Time Point Name {data($tptname)} is populated, value = {data($tptvalue)}
]]>
Missing value for --TPTREF, when --ELTM is provided - Time Point Reference (--TPTREF) should not be NULL, when Planned Elapsed Time from Time Point Ref (--ELTM) is populated
3.1.2
3.1.3
3.2
ALL
Missing value for {data($tptrefname)} when {data($eltmname)} is populated, value={data($eltmvalue)}
]]>
Missing value for --DOSU, when --DOSE, --DOSTXT or --DOSTOT is provided - Dose Units (--DOSU) must be populated, when Dose per Administration (--DOSE), Dose Description (--DOSTXT) or Total Daily Dose (--DOSTOT) is provided
3.1.2
3.1.3
3.2
INTERVENTIONS
Missing value for {data($dosuname)}, when {data($dosename)}, {data($dostxtname)} or {data($dostotname)} is provided
]]>
Missing value for --STRESC, when --ORRES is provided - Character Result/Finding in Std Units (--STRESC) must be populated, when Result or Finding in Original Units (--ORRES) is provided
3.1.2
3.1.3
3.2
FINDINGS
Missing value for {data($strescname)}, when {data($orresname)} is provided, value={data($orresvalue)} is provided in dataset {data($datasetname)}
]]>
Value for variable not found in user-defined codelist - Variable values should be populated with terms found in the user-defined codelist associated with the variable in define.xml
3.1.2
3.1.3
3.2
ALL
Value for variable {data($itemdefname)}: value {data($itemdatavalue)} not found in user-defined codelist {data($codelistoid)}
]]>
Value of Study Day variable equals 0 - Study Day variables (*DY) value should not equal 0
3.1.2
3.1.3
3.2
ALL
Value of Study Day {data($dyname)} variable equals 0
]]>
Inconsistent value for --TEST within --TESTCD - All values of Name of Measurement, Test or Examination (--TEST) should be the same for a given value of Short Name of Measurement, Test or Examination (--TESTCD)
3.1.2
3.1.3
3.2
FINDINGS
1] (: start from the second one :)
let $recnum := $record/@data:ItemGroupDataSeq
let $testvalue := $record/odm:ItemData[@ItemOID=$testoid]/@Value
(: take the previous record in the same group, and take its --TEST value :)
let $precrecord := $record/preceding-sibling::odm:ItemGroupData[1] (: as they come in descending order :)
let $recnum2 := $precrecord/@data:ItemGroupDataSeq
let $testvalue2 := $precrecord/odm:ItemData[@ItemOID=$testoid]/@Value
let $recnum2 := $precrecord/@data:ItemGroupDataSeq
(: when the value of--TEST in both records is different, report an error :)
where not($testvalue2 = $testvalue)
return Inconsistent value for {data($testname)} within {data($testcdname)}={data($testcdvalue)} in dataset {data($datasetname)}. Following values were found: record number {data($recnum2)}: {data($testname)}='{data($testvalue2)}' - record number {data($recnum)}: {data($testname)}='{data($testvalue)}'
]]>
Inconsistent value for --TEST within --TESTCD, single dataset or domain - All values of Name of Measurement, Test or Examination (--TEST) should be the same for a given value of Short Name of Measurement, Test or Examination (--TESTCD)
3.1.2
3.1.3
3.2
FINDINGS
1] (: start from the second one :)
let $recnum := $record/@data:ItemGroupDataSeq
let $testvalue := $record/odm:ItemData[@ItemOID=$testoid]/@Value
(: take the previous record in the same group, and take its --TEST value :)
let $precrecord := $record/preceding-sibling::odm:ItemGroupData[1] (: as they come in descending order :)
let $recnum2 := $precrecord/@data:ItemGroupDataSeq
let $testvalue2 := $precrecord/odm:ItemData[@ItemOID=$testoid]/@Value
let $recnum2 := $precrecord/@data:ItemGroupDataSeq
(: when the value of--TEST in both records is different, report an error :)
where not($testvalue2 = $testvalue)
return Inconsistent value for {data($testname)} within {data($testcdname)}={data($testcdvalue)} in dataset {data($datasetname)}. Following values were found: record number {data($recnum2)}: {data($testname)}='{data($testvalue2)}' - record number {data($recnum)}: {data($testname)}='{data($testvalue)}'
]]>
Value for --OCCUR is populated for unsolicited Intervention or Event - Occurrence (--OCCUR) may only be populated, when a given Intervention or Event has been pre-specified (--PRESP = 'Y')
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
Value for {data($occurname)} is populated for unsolicited Intervention or Event
]]>
--STAT does not equal 'NOT DONE', when --PRESP='Y' and --OCCUR is NULL - When no response is provided for Occurrence (--OCCUR) for a pre-specified Intervention or Event (--PRESP = 'Y'), then Status (--STAT) should be set to 'NOT DONE'
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
{data($statname)} does not equal 'NOT DONE', when {data($prespname)}='Y' and {data($occurname)} is NULL in dataset {data($datasetname)}, value found for 'NOT DONE'={data($statvalue)}
]]>
Missing value for --TRTV, when --VAMT is not NULL - Treatment Vehicle (--TRTV) should be provided, when Treatment Vehicle Amount (--VAMT) is specified
3.1.2
3.1.3
3.2
INTERVENTIONS
Missing value for {data($trtvname)}, when {data($vamtname)} is not NULL
]]>
Missing value for --VAMTU, when --VAMT is populated - Treatment Vehicle Amount Units (--VAMTU) should not be NULL, when Treatment Vehicle Amount (--VAMT) is populated
3.1.2
3.1.3
3.2
INTERVENTIONS
Missing value for {data($vamtuname)}, when {data($vamtname)} is populated
]]>
Missing value for --STRESC, when --RESCAT is populated - Character Result/Finding in Std Units (--STRESC) should be provided, when Result Category (--RESCAT) is specified
3.1.2
3.1.3
3.2
FINDINGS
Missing {data($strescname)}, when {data($rescatname)} value={data($rescatvalue)} is provided in dataset {data($datasetname)}
]]>
Inconsistent value for QLABEL within QNAM - All values of Qualifier Variable Label (QLABEL) should be the same for a given value of Qualifier Variable Name (QNAM)
3.1.2
3.1.3
3.2
SUPPQUAL
Inconsistent value for QLABEL within QNAM={data($uniqueqnam)} in dataset {data($datasetname)}. {data($uniqueqlabelvaluescount)} different combinations were found
]]>
Missing value for --ORRES, when --STAT or --DRVFL is not populated - Status (--STAT) should be set to 'NOT DONE' or Derived Flag (--DRVFL) should have a value of 'Y', when Result or Finding in Original Units (--ORRES) is NULL
3.1.2
3.1.3
3.2
FINDINGS
Status {data($statname)} should be set to 'NOT DONE' or Derived Flag {data($drvflname)} should have a value of 'Y', when Result or Finding in Original Units {data($orresname)} is NULL
]]>
Status (--STAT) must be NULL, when Result or Finding in Original Units (--ORRES) is provided - Status (--STAT) should be NULL, when Result or Finding in Original Units (--ORRES) is provided
3.1.2
3.1.3
3.2
FINDINGS
Status {data($statname)} should be NULL, when Result or Finding in Original Units ({data($orresname)}) is provided
]]>
Missing value for --STTPT, when --STRTPT is populated - Start Reference Time Point (--STTPT) must not be NULL, when Start Relative to Reference Time Point (--STRTPT) is provided
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
FINDINGS
SV
SE
Missing value for {data($sttptname)}, when {data($strtptname)} is populated, value = {data($strtptvalue)}
]]>
Missing value for --ENTPT, when --ENRTPT is populated - End Reference Time Point (--ENTPT) must not be NULL, when End Relative to Reference Time Point (--ENRTPT) is provided
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
FINDINGS
SV
SE
Missing value for {data($entptname)}, when {data($enrtptname)} is populated, value = {data($enrtptvalue)}
]]>
Inconsistent value for VISIT within VISITNUM - All values of Visit Name (VISIT) should be the same for a given value of Visit Number (VISITNUM) in domains TV and SV
3.1.2
3.1.3
3.2
SV
TV
Inconsistent value for VISIT within VISITNUM={data($uniquevisitnum)} in dataset {data($datasetname)}. {data($uniquevisitvaluescount)} different combinations were found
]]>
Inconsistent value for VISITNUM within VISIT - All values of Visit Number (VISITNUM) should be the same for a given value of Visit Name (VISIT)
3.1.2
3.1.3
3.2
SV
TV
Inconsistent value for VISITNUM within VISIT={data($uniquevisit)} in dataset {data($datasetname)}. {data($uniquevisitnumvaluescount)} different combinations were found
]]>
ARM is not 'Not Assigned', when ARMCD equals 'NOTASSGN', or vice versa - Description of Arm (ARM) must equal 'Not Assigned', when Arm Code (ARMCD) is 'NOTASSGN', and vice versa
3.1.2
3.1.3
3.2
DM
TA
ARM is not 'Not Assigned', when ARMCD equals 'NOTASSGN', or vice versa. ARMCD={data($armcdvalue)} with ARM={data($armvalue)} was found
]]>
SDTM Required variable not found - Variables described in SDTM as Required must be included in the dataset -
3.1.2
3.1.3
3.2
ALL
No data found for required variable {data($varname)} in record number {data($recnum)} in dataset {data($datasetname)}
]]>
SDTM Expected variable not found - Variables described in SDTM as Expected should be included in the dataset
3.1.2
3.1.3
3.2
ALL
0) then $domain
else $name
)
(: In order to limit the number of calls to the CDISC Library,
we ask for all the variables for the current class,
for which the response contains the "core" which can be "Exp" (expected) :)
let $cdisclibraryquery := concat($cdisclibrarybase,'/sdtmig/',$sdtmigversion,'/classes/',$class)
let $cdisclibraryresponse := http:send-request(, $cdisclibraryquery)
(: get the CDISC library reponse limited to the current domain :)
let $cdisclibrarydomain := $cdisclibraryresponse/json/datasets/*[name=$domainname]
(: iterate over all the variables that are "expected" (core=Exp) :)
for $expectedvarname in $cdisclibrarydomain//datasetVariables/*[core='Exp']/name
(: now check whether the expected variable is in the define.xml for this domain :)
let $itemoid := (
for $a in $definedoc//odm:ItemDef[@Name=$expectedvarname]/@OID
where $a = $dataset/odm:ItemRef/@ItemOID
return $a
)
(: When not, give an error :)
where not($itemoid)
return Expected SDTM variable {data($expectedvarname)} is not found
]]>
Variable appears in dataset, but is not in SDTM model - Only variables listed in SDTM model should appear in a dataset. New sponsor defined variables must not be added, and existing variables must not be renamed or modified
3.1.2
3.1.3
3.2
ALL
, $cdisclibraryquerysdtmmodel)
(: we will also need to look into the 'GeneralObservations' itself :)
let $cdisclibraryquerysdtmgeneral := concat($cdisclibrarybase,'sdtm/',$sdtmversion,'/classes/GeneralObservations')
let $cdisclibrarysdtmgeneralresponse := http:send-request(, $cdisclibraryquerysdtmgeneral)
(: iterate over the defined variables (by OID) and then name :)
(: but ONLY when we are in a "General Observation" class :)
for $varoid in $dataset/odm:ItemRef/@ItemOID[$class='Findings' or $class='Events' or $class='Interventions' or $class='FindingsAbout']
let $varname := $definedoc//odm:ItemDef[@OID=$varoid]/@Name
(: workaround for when the Domain attribute is not populated
which we see a lot in older define.xml files :)
let $domainname := (
if(string-length($domain)>0) then $domain
else $name
)
(: we need to take generic variable names into account,
e.g. LBDTC goes into --DTC :)
let $varnamegen := (
if(starts-with($varname,$domainname))
then concat('--',substring($varname,3))
else $varname
)
(: when not found, it needs to be looked up in the IG :)
where not($cdisclibrarysdtmmodelresponse/json//*[name=$varnamegen]) and not($cdisclibrarysdtmgeneralresponse/json//*[name=$varnamegen])
return Variable {data($varname)} is not in the model list of allowed variables for class {data($class)}
]]>
Define.xml/dataset variable type mismatch - Variable Data Types in the dataset must match the variable data types described in the data definition document (define.xml)
3.1.2
3.1.3
3.2
ALL
Define.xml/dataset variable type mismatch - Data point with OID = {data($itemoid)} and name = {data($varname)} and value {data($itemvalue)} is expected to be of type {data($datatype)}
]]>
Define.xml/dataset variable type mismatch - Variable Data Types in the dataset must match the variable data types described in the data definition document (define.xml)
3.1.2
3.1.3
3.2
ALL
Define.xml/dataset variable type mismatch - Data point with OID = {data($itemoid)} and name = {data($varname)} and value {data($itemvalue)} is expected to be of type {data($datatype)}
]]>
Variable in dataset is not present in define.xml - Variables included in the dataset must be described in the data definition document (define.xml)
3.1.2
3.1.3
3.2
ALL
variable with OID {data($varoid)} found in dataset {data($itemgroupdefname)} is not described in {data($define)} in ItemGroupDef with Name={data($itemgroupdefname)} and OID={data($itemgroupdefoid)}
]]>
Domain referenced in define.xml but dataset is missing - Domains referenced in data definition document (define.xml) should be included in the submission
3.1.2
3.1.3
3.2
ALL
Dataset {data($filename)} referenced in {$define} but dataset is missing in submission
]]>
SDTM/dataset variable label mismatch - Variable Label in the dataset should match the variable label described in SDTM. When creating a new domain Variable Labels could be adjusted as appropriate to properly convey the meaning in the context of the data being submitted
ALL
3.1.2
3.1.3
3.2
Variable Label mismatch for variable {data($varname)} in dataset {data($datasetname)}: label '{data($cdisclabel)}' was expected but '{data($varlabel)}' was found
]]>
Subject is not present in DM domain - All Subjects (USUBJID) must be present in Demographics (DM) domain
3.1.2
3.1.3
3.2
ALL
USUBJID {data($value)} in dataset {data($datasetname)} could not be found in DM dataset
]]>
USUBJID/VISIT/VISITNUM values do not match SV domain data - All Unique Subject Identifier (USUBJID) + Visit Name (VISIT) + Visit Number (VISITNUM) combination values in data should be present in the Subject Visits (SV) domain - There is an exception for records, where Status (-STAT) variable value is populated. E.g., -STAT = 'NOT DONE'
3.1.2
3.1.3
3.2
ALL
Combination of USUBJID='{data($usubjid)}' and VISITNUM='{data($visitnum)}' and VISIT='{data($visit)}' in dataset {data($datasetname)} does not match SV domain data
]]>
Invalid ARMCD - Planned Arm Code (ARMCD) values should match entries in the Trial Arms (TA) dataset, except for subjects who failed screening (ARMCD = 'SCRNFAIL') or were not fully assigned to an Arm (ARMCD = 'NOTASSGN')
3.1.2
3.1.3
3.2
DM
Invalid ARMCD='{data($dmarmcd)}' in DM dataset {data($dmdatasetname)} for USUBJID={data($usubjidvalue)} - ARMCD was not found in the TA dataset {data($tadatasetname)}
]]>
Invalid ETCD - Element Code (ETCD) values should match entries in the Trial Elements (TE) dataset, except for unplanned Element (ETCD = 'UNPLAN')
3.1.2
3.1.3
3.2
SE
TA
Invalid ETCD: Element Code ETCD={data($etcdvalue)} in dataset {data($datasetname)} was not found in TE dataset {data($tedatasetlocation)}
]]>
Invalid IETESTCD
3.1.2
3.1.3
3.2
IE
TI
Invalid IETESTCD={data($ietestcdvalue)} in dataset {data($iedatasetname)} short name was not found in TI dataset {data($tidatasetname)}
]]>
No Disposition record found for subject - All Demographics (DM) subjects (USUBJID) should have at least one record in the Disposition (DS) domain with only possible exceptions to Screen Failures (ARMCD='SCRNFAIL') and Not Assigned Treatment (ARMCD='NOTASSGN') subjects
3.1.2
3.1.3
3.2
DS
DM
No disposition records were found in dataset {data($dsdatasetname)} for subject {data($usubjidvalue)} with assigned arm {data($arm)}
]]>
No Exposure record found for subject - All Demographics (DM) subjects (USUBJID) participating in a study that includes investigational product should have at least one record in the Exposure (EX) domain, except for subjects who failed screening (ARMCD = 'SCRNFAIL') or were not fully assigned to an Arm (ARMCD = 'NOTASSGN')
3.1.2
3.1.3
3.2
EX
DM
No exposure records were found in dataset {data($exdatasetname)} for subject {data($usubjidvalue)} with assigned arm {data($arm)}
]]>
Invalid ARM/ARMCD - The combination of Description of Planned Arm (ARM) and Planned Arm Code (ARMCD) values must match entries in the Trial Arms (TA) dataset, except for subjects who failed screening (ARMCD = 'SCRNFAIL') or were not fully assigned to an Arm (ARMCD = 'NOTASSGN')
3.1.2
3.1.3
3.2
DM
Invalid ARMCD/ARM combination in DM dataset {data($dmdatasetname)}: combination of ARMCD='{data($armcdvalue)}' and ARM='{data($armvalue)}' was not found in the TA dataset {data($tadatasetname)}
]]>
Invalid RDOMAIN - Related Domain Abbreviation (RDOMAIN) must have a valid value of Domains included in the study data
3.1.2
3.1.3
3.2
CO
RELREC
SUPPQUAL
Invalid value for RDOMAIN={data($rdomainvalue)} in dataset {data($datasetname)} - domain {data($rdomainvalue)} was not found in the define.xml file {data($define)}
]]>
Invalid IDVAR - Identifying Variable (IDVAR) must have a valid value of variables from a referenced Domain
3.1.2
3.1.3
3.2
CO
RELREC
SUPPQUAL
{data($idvaroid)} :)
(: now iterate over all the record in these dataset :)
for $record in $datasetdoc//odm:ItemGroupData
let $recnum := $record/@data:ItemGroupDataSeq
(: and get the value of the RDOMAIN variable :)
let $idvarvalue := $record/odm:ItemData[@ItemOID=$idvaroid]/@Value
(: and check whether defined in the define.xml :)
(: but only in case there is a value - for example, for SUPPDM, IDVAR must be null :)
where $idvarvalue and not($definedoc//odm:ItemDef[@Name=$idvarvalue])
return Invalid value for IDVAR={data($idvarvalue)} in dataset {data($datasetname)} - variable {data($idvarvalue)} was not found in the define.xml file {data($define)}
]]>
Invalid referenced record - Reference record defined by Related Domain Abbreviation (RDOMAIN), Unique Subject Identifier (USUBJID), Identifying Variable (IDVAR) and Identifying Variable Value (IDVARVAL) must exist in the target Domain
3.1.2
3.1.3
3.2
CO
RELREC
SUPPQUAL
Invalid referenced record - Dataset={data($name)}: no parent records found in RDOMAIN={data($rdomainval)} for USUBJID={data($usubjidvalue)}
]]>
EX record is present, when subject is not assigned to an arm - Subjects that have withdrawn from a trial before assignment to an Arm (ARMCD='NOTASSGN') should not have any Exposure records
3.1.2
3.1.3
3.2
EX
DM
0 (: at least one EX record was found :)
return {data($count)} EX records were found in EX dataset {data($exdatasetname)} for USUBJID={data($usubjidvalue)} although subject has not been assigned to an arm (ARMCD='NOTASSGN') in DM dataset {data($dmdatasetname)}
]]>
AE start date is after the latest Disposition date - Start Date/Time of Adverse Event (AESTDTC) should be less than or equal to the Start Date/Time of the latest Disposition Event (DSSTDTC)
3.1.2
3.1.3
3.2
AE
AE start date, value={data($aestdtcvalue)} is after the latest Disposition date, value={data($latestdate)}
]]>
Exposure end date is after the latest Disposition date - End Date/Time of Treatment (EXENDTC) should be less than or equal to the Start Date/Time of the latest Disposition Event (DSSTDTC)
3.1.2
3.1.3
3.2
EX
DS
Exposure end date EXENDTC={data($exendtcvalue)} for USUBJID={data($exusubjidvalue)} is after last disposition date {data($latestdate)}
]]>
Negative value for AGE - The value of Age (AGE) cannot be less than 0
3.1.2
3.1.3
3.2
DM
= 0 :)
where $agevalue and number($agevalue) < 0
return Negative value for AGE in DM dataset {data($dmdatasetname)}: {data($agevalue)} was found
]]>
Mismatch between IEORRES and IESTRESC values - I/E Criterion Original Result (IEORRES) and I/E Criterion Result in Std Format (IESTRESC) should have the same value
3.1.2
3.1.3
3.2
IE
Mismatch between IEORRES and IESTRESC values for USUBJID={data($usubjid)}. IEORRES found is {data($ieorres)}, whereas IESTRESC found is {data($iestresc)}
]]>
SUPPQUAL duplicate records - All SUPPQUAL Domains records must have a unique combination of Study Identifier (STUDYID), Unique Subject Identifier (USUBJID), Identifying Variable (IDVAR), Identifying Variable Value (IDVARVAL) and Qualifier Variable Name (QNAM) variable value. For all SUPPQUAL domain record all The QNAM variable should be unique for each parent record.
3.1.2
3.1.3
3.2
ALL
SUPPQUAL duplicate records: {data($countrecords)} parent records were found in dataset {data($name)} with STUDYID={data($studyidvalue)} and USUBJID={data($usubjidvalue)} and IDVAR={data($idvarvalue)} and IDVARVAL={data($idvarvalvalue)} and QNAM={data($qnamvalue)}
]]>
RFSTDTC is not provided for a randomized subject - Subject Reference Start Date/Time (RFSTDTC) should be populated for all randomized subjects, those where Planned Arm Code (ARMCD) is not equal to 'SCRNFAIL' or 'NOTASSGN'
3.1.2
3.1.3
3.2
DM
RFSTDTC is not provided for a randomized subject with USUBJID={data($usubjidvalue)}
]]>
RFENDTC is not provided for a randomized subject - Subject Reference End Date/Time (RFENDTC) should be populated for all randomized subjects, those where Planned Arm Code (ARMCD) is not equal to 'SCRNFAIL' or 'NOTASSGN'
3.1.2
3.1.3
3.2
DM
RFENDTC is not provided for a randomized subject with USUBJID={data($usubjidvalue)}
]]>
Missing values for TEENRL and TEDUR - At least one of Rule for End of Element (TEENRL) or Planned Duration of Element (TEDUR) should be populated in TE
3.1.2
3.1.3
3.2
TE
Missing values for TEENRL and TEDUR
]]>
AESDTH is not 'Y', when AEOUT='FATAL' - Results in Death (AEDTH) should equal 'Y', when Outcome of Adverse Event (AEOUT) is 'FATAL'
3.1.2
3.1.3
3.2
AE
AESDTH is not 'Y', when AEOUT='FATAL', value for AESDTH found is '{data($aesdthvalue)}'
]]>
AEOUT is not 'FATAL', when AESDTH='Y' - Outcome of Adverse Event should equal 'FATAL', when Results in Death (AEDTH) is 'Y'
3.1.2
3.1.3
3.2
AE
AEOUT is not 'FATAL', when AESDTH='Y', '{data($aeoutvalue)}' was found
]]>
Missing value for SEUPDES, when ETCD='UNPLAN' - Description of Unplanned Element (SEUPDES) should be populated, when subject's experience for a particular period of time is represented as an unplanned Element, where Element Code (ETCD) is equal to 'UNPLAN'
3.1.2
3.1.3
3.2
SE
Missing value for SEUPDES, when ETCD='UNPLAN' in dataset {data($sedatasetname)}
]]>
Missing value for AGEU, when AGE is provided - Age Units (AGEU) should be provided, when Age (AGE) is populated
3.1.2
DM
Missing value for AGEU, when AGE is provided
]]>
Invalid usage of SUPPQUAL for non-general-observation-class Domain - Supplemental Qualifiers special purpose dataset (SUPP-) can only be used to capture non-standard variables and their association to parent records in general-observation-class datasets (Events, Findings, Interventions) and Demographics
3.1.2
3.1.3
3.2
ALL
Invalid usage of SUPPQUAL for non-general-observation-class Domain: RDOMAIN '{data($rdomainvalue)}' was found - allowed in this submission are only: {data($generalclassesdomains)}
]]>
Duplicate SUBJID - The value of Subject Identifier for the Study (SUBJID) variable must be unique for each subject within the study - DM
3.1.2
3.1.3
3.2
DM
$recnum][odm:ItemData[@ItemOID=$subjidoid][@Value=$subjidvalue]])
where $count > 0
return Duplicate value of SUBJID={data($subjidvalue)} - {data($count)} in dataset {data($dmdatasetname)}
]]>
RFSTDTC is after RFENDTC - Subject Reference Start Date/Time (RFSTDTC) must be less than or equal to Subject Reference End Date/Time (RFENDTC)
3.1.2
3.1.3
3.2
DM
xs:dateTime($endtctestvalue)
return RFSTDTC={data($rfstdtcvalue)} is after RFENDTC={data($rfendtcvalue)} for subject with USUBJID={data($usubjidvalue)}
]]>
Missing value for AGE, when AGEU is provided - Age (AGE) should be provided, when Age Units (AGEU) are populated
3.1.2
DM
Missing value for AGE, when AGEU is provided
]]>
Invalid value for ARMCD - The value of Planned Arm Code (ARMCD) should be no more than 20 characters in length
3.1.2
3.1.3
3.2
DM
TA
TV
20
return Invalid value for ARMCD={data($armcdvalue)} in dataset {data($datasetname)} - it has more than 20 characters
]]>
Invalid STUDYID - Study Identifier (STUDYID) values must match the STUDYID in Demographics (DM) domain
3.1.2
3.1.3
3.2
ALL
STUDYID {data($d/@Value)} in dataset {data($dataset)} does not match the STUDYID {data($dmstudyid)} in the DM dataset
]]>
CODTC is populated, when comment is a child record of another domain - The value of Date/Time of Comment (CODTC) should be NULL, when comments are related to a specific parent record or group of parent records in a domain (RDOMAIN, IDVAR and IDVARVAL are populated
3.1.2
3.1.3
3.2
CO
CODTC is populated (value={data($codtcvalue)}), although comment is a child record of another domain, with RDOMAIN={data($rdomainvalue)}, IDVAR={data($idvarvalue)} and IDVARVAL={data($idvarvalue)}
]]>
Invalid value for ETCD - The value of Element Code (ETCD) should be no more than 8 characters in length
3.1.2
3.1.3
3.2
SE
8
return Invalid value for ETCD in SE dataset {data($sedatasetname)} - Value {data($etcdvalue)} has more than 8 characters
]]>
ELEMENT value is populated, when ETCD= 'UNPLAN' - Description of Element (ELEMENT) should be NULL, when subject's experience for a particular period of time is represented as an unplanned Element, where Element Code (ETCD) is equal to 'UNPLAN'
3.1.2
3.1.3
3.2
SE
0
return ELEMENT value is populated, when ETCD='UNPLAN', value found for ELEMENT={data($elementvalue)}
]]>
Invalid ISO 8601 value for (--DUR, --ELTM, or --EVLINT) variable - Value of Duration, Elapsed Time, and Interval variables (--DUR, --ELTM, --EVLINT) must conform to the ISO 8601 international standard
3.1.2
3.1.3
3.2
ALL
invalid ISO-8601 duration for variable {data($itemname)} value = {data($value)} in dataset {data($itemgroupdefname)}
]]>
Invalid ETCD/ELEMENT - The combination of Element Code (ETCD) and Description of Element (ELEMENT) values should match entries in the Trial Elements (TE) dataset, except for unplanned Element (ETCD = 'UNPLAN') - dataset SE,TA
3.1.2
3.1.3
3.2
SE
TA
Invalid ETCD/ELEMENT in dataset {data($datasetname)}. The combination of Element Code ETCD={data($etcdvalue)} and Description of Element ELEMENT={data($elementvalue)} was not found in the TE dataset {data($tedatasetname)}
]]>
TAETORD is populated, ETCD = 'UNPLAN' - Planned Order of Elements within Arm (TAETORD) should be NULL, when subject's experience for a particular period of time is represented as an unplanned Element (ETCD = 'UNPLAN')
3.1.2
3.1.3
3.2
SE
0
return TAETORD is populated, value={data($taetordvalue)} with ETCD='UNPLAN' in dataset SE
]]>
Invalid TAETORD - Order of Element within Arm (TAETORD) values for all datasets should match entries in the Trial Arms (TA) dataset
3.1.2
3.1.3
3.2
ALL
Invalid TAETORD in {data($name)} in dataset {data($datasetname)}. TAETORD={data($taetord)} was not found in dataset {data($tadatasetname)}
]]>
Invalid EPOCH - Epoch (EPOCH) values in all datasets should match entries in the Trial Arms (TA) dataset
3.1.2
3.1.3
3.2
ALL
Invalid EPOCH. Value for EPOCH={data($epochvalue)} in dataset {data($datasetname)} was not found in the TA dataset {data($tadatasetname)}
]]>
Invalid IETESTCD/IETEST/IECAT - The combination of Inclusion/Exclusion Criterion Short Name (IETESTCD), Criterion (IETEST), and Category (IECAT) values in IE should match entries in the Trial Inclusion/Exclusion Criteria (TI) dataset
3.1.2
3.1.3
3.2
IE
Invalid IETESTCD/IETEST/IECAT in dataset {data($iedatasetname)}. The combination of IETESTCD={data($ietestcdvalue)} and IETEST={data($ietestvalue)} and IECAT={data($ieietcatvalue)} cannot be found in the TI dataset {data($tidatasetname)}
]]>
VISITNUM value does not match TV domain data - Visit Number (VISITNUM) values should match entries in the Trial Visits (TV) dataset, when they are planned visits (SVUPDES = NULL)
3.1.2
3.1.3
3.2
SV
VISITNUM value={data($svvisitnumvalue)} in SV does not match TV domain data
]]>
VISITNUM/VISIT/VISITDY values do not match TV domain data - The combination of Visit Number (VISITNUM), Visit Name (VISIT), and Planned Study Day of Visit (VISITDY) values should match entries in the Trial Visits (TV) dataset, when they are planned visits (SVUPDES = NULL)
3.1.2
3.1.3
3.2
SV
VISITNUM/VISIT/VISITDY values in SV do not match TV domain data, SV VISITNUM={data($svvisitnumvalue)}, VISIT={data($svvisitvalue)}, VISITDY={data($svvisitdyvalue)}
]]>
VISITDY is populated for unplanned visit - Planned Study Day of Visit (VISITDY) should equal NULL for unplanned visits, where Description of Unplanned Visit (SVUPDES) is populated
3.1.2
3.1.3
3.2
SV
VISITDY is populated for unplanned visit, value for VISITDY={data($visitdyvalue)} in dataset SE
]]>
missing DM dataset - Demographics (DM) dataset must be included in every submission
3.1.2
3.1.3
3.2
DM
Document {data($dmdatasetname)} could not be found in collection {data($base)}
]]>
Invalid value for QNAM variable - The value of Qualifier Variable Name (QNAM) should be limited to 8 characters, cannot start with a number, and cannot contain characters other than letters in upper case, numbers, or underscores
3.1.2
3.1.3
3.2
SUPPQUAL
8 or not(matches($qnamvalue,'[A-Z_][A-Z0-9_]*'))
return Invalid value for QNAM in dataset {data($datasetname)} - Label={data($qnamvalue)} has more than 8 characters or starts with a number or contains characters other than letters in upper case, numbers, or underscores
]]>
VISIT/VISITNUM values do not match TV domain data - Combination of Visit Name (VISIT) and Visit Number (VISITNUM) in subject-level domains should match that in the TV domain with the exception of Unscheduled and Unplanned visits
3.1.2
3.1.3
3.2
ALL
VISIT={data($visitvalue)}, VISITUM={data($visitnumvalue)} in dataset {data($datasetname)} does not match TV domain data in dataset TV
]]>
Invalid value for RELTYPE variable - Relationship Type (RELTYPE) in RELREC must be NULL, when Identifying Variable (IDVAR) is populated with a --SEQ value
3.1.2
3.1.3
3.2
RELREC
0
return Invalid value for RELTYPE variable. Non-null value={data($relvalue)} was found though identifying variable is {data($idvarvalue)}
]]>
Non-unique value for ELEMENT within ETCD - Description of Element (ELEMENT) must have a unique value for a given value of Element Code (ETCD) within the domain
3.1.2
3.1.3
3.2
SE
TA
$recnum][odm:ItemData[@ItemOID=$etcdoid] and odm:ItemData[@ItemOID=$elementoid]]
let $recnum2 := $record2/@data:ItemGroupDataSeq
(: and again, get the values of ETCD and ELEMENT :)
let $etcdvalue2 := $record2/odm:ItemData[@ItemOID=$etcdoid]/@Value
let $elementvalue2 := $record2/odm:ItemData[@ItemOID=$elementvalue]/@Value
(: get the duplicates :)
where $etcdvalue=$etcdvalue2 and $elementvalue=$elementvalue2
return Non-unique value for ELEMENT within ETCD. Records {data($recnum)} and {data($recnum2)} have the same combination of ETCD={data($etcdvalue)} and ELEMENT={data($elementvalue)} in dataset {data($name)}
]]>
Value for --STRF is populated, when RFSTDTC is NULL - Start Relative to Reference Period (--STRF) should not be populated for subjects with missing value for Reference Start Date/Time (RFSTDTC)
3.1.2
3.1.3
3.2
ALL
Value for {data($strfname)} is populated(value={data($strfvalue)}), when RFSTDTC is NULL in dataset {data($datasetname)}
]]>
Value for --ENRF is populated, when RFENDTC is NULL - End Relative to Reference Period (--ENRF) should not be populated for subjects with missing value for Reference End Date/Time (RFENDTC)
3.1.2
3.1.3
3.2
ALL
Value for {data($enrfname)} is populated(value={data($enrfvalue)}), when RFENDTC is NULL in dataset {data($datasetname)}
]]>
No records for 'SCRNFAIL' subject are found in IE domain - All subjects with Planned Arm Code (ARMCD) equals 'SCRNFAIL' should have records in the Inclusion/Exclusion Criteria Not Met (IE) domain
3.1.2
3.1.3
3.2
IE
DM
No records for in IE dataset {data($iedatasetname)} for Screen Failure subject with USUBJID {data($dmusubjid)}
]]>
Inconsistent value for ARM - A value for Description of Planned Arm (ARM) must have a unique value for Planned Arm Code (ARMCD) with the domain DM, TA, TV
3.1.2
3.1.3
3.2
DM
TA
TV
Inconsistent value for ARM within ARMCD={data($uniquearmcd)} in dataset {data($datasetname)}. {data($uniquearmvaluescount)} different combinations were found
]]>
Inconsistent value for ARMCD - A value for Planned Arm Code (ARMCD) must have a unique value for Description of Planned Arm (ARM) with the domain within the domain DM, TA, TV
3.1.2
3.1.3
3.2
DM
TA
TV
Inconsistent value for ARMCD within ARM={data($uniquearm)} in dataset {data($datasetname)}. {data($uniquearmcdvaluescount)} different combinations were found
]]>
Missing value for DSCAT - Category for Disposition Event (DSCAT) should be populated
3.1.2
3.1.3
3.2
DS
Missing value for DSCAT
]]>
Missing value for --TOXGR, when --TOX is populated - Toxicity Grade (--TOXGR) should be provided, when Toxicity (--TOX) is populated
3.1.2
3.1.3
3.2
AE
MH
CE
EG
LB
PC
PP
Missing value for {data($toxgrname)}, when {data($toxname)} is populated, value={data($toxvalue)}
]]>
Missing value for --TOX, when --TOXGR is populated - A value for a Toxicity (--TOX) variable should be provided, when a Toxicity Grade (--TOXGR) variable value is populated and greater than 0
3.1.2
3.1.3
3.2
AE
MH
CE
EG
LB
PC
PP
0 :)
let $toxvalue := $record/odm:ItemData[@ItemOID=$toxoid]/@Value
where number($toxgrvalue) and not($toxvalue)
return Missing value for {data($toxname)}, when {data($toxgrname)} is populated with a value >0, value={data($toxgrvalue)}
]]>
Non-unique value for TSSEQ variable within TSPARMCD - The value of Sequence Number (--SEQ) variable must be unique for each record within a domain and within each Unique Subject Identifier (USUBJID) or Pool Identifier (POOLID) variables value when they are present in the domain.
3.1.2
3.1.3
3.2
TS
$recnum] :)
let $count := count($tsdatasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$tsseq and @Value=$seqvalue] and odm:ItemData[@ItemOID=$tsparmcd and @Value=$parmcdvalue]])
where $count > 1
return Non-unique value for TSSEQ variable within TSPARMCD - combination of TSSEQ={data($seqvalue)} and TSPARMCD={data($parmcdvalue)} occurs {data($count)} times
]]>
Redundancy in paired variables values - Value of Category (--CAT) should not be identical to that in Domain Abbreviation (DOMAIN); Reported Term (--TERM); Name of Measurement, Test, or Examination (--TESTCD); Name of Treatment (--TRT); Body System or Organ Class (--BODSYS)
3.1.2
3.1.3
3.2
ALL
Redundancy in paired variables values for {data($catname)} with value={data($catvalue)}.
]]>
Redundancy in paired variables values - Value of Subcategory (--SCAT) should not be identical to that in Domain Abbreviation (DOMAIN); Reported Term (--TERM); Name of Measurement, Test, or Examination (--TESTCD); Name of Treatment (--TRT); Body System or Organ Class (--BODSYS)
3.1.2
3.1.3
3.2
ALL
Redundancy in paired variables values for {data($scatname)} with value={data($scatvalue)}.
]]>
Values for --CAT and --SCAT are identical - Values of Category (--CAT) and Subcategory (--SCAT) variables should not be identical
ALL
3.1.2
3.1.3
3.2
Values for {data($catname)} and {data($scatname)} are identical in dataset {data($datasetname)}
]]>
--STRF Time point for non-occurred event or intervention is provided - Value of Start Relative to Reference Period (--STRF) should not be populated, when an event or intervention is marked as not occurred
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
Value of Start Relative to Reference Period ({data($strfname)} should not be populated for non-occurred event or intervation is provided, with value of {data($occurname)}={data($occurvalue)}
]]>
--ENRF Time point for non-occurred event or intervention is provided - Value of End Relative to Reference Period (--ENRF) should not be populated, when an event or intervention is marked as not occurred
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
Value of End Relative to Reference Period ({data($enrfname)} should not be populated for non-occurred event or intervation is provided, with value of {data($occurname)}={data($occurvalue)}
]]>
Inconsistent value for --TESTCD within --TEST - All values of Short Name of Measurement, Test or Examination (--TESTCD) should be the same for a given value of Name of Measurement, Test or Examination (--TEST)
3.1.2
3.1.3
3.2
FINDINGS
1] (: start from the second one :)
let $recnum := $record/@data:ItemGroupDataSeq
let $testcdvalue := $record/odm:ItemData[@ItemOID=$testcdoid]/@Value
(: take the previous record in the same group, and take its --TESTCD value :)
let $precrecord := $record/preceding-sibling::odm:ItemGroupData[1] (: as they come in descending order :)
let $recnum2 := $precrecord/@data:ItemGroupDataSeq
let $testcdvalue2 := $precrecord/odm:ItemData[@ItemOID=$testcdoid]/@Value
let $recnum2 := $precrecord/@data:ItemGroupDataSeq
(: when the value of--TESTCD in both records is different, report an error :)
where not($testcdvalue2 = $testcdvalue)
return Inconsistent value for {data($testcdname)} within {data($testname)}='{data($testvalue)}' in dataset {data($datasetname)}. Following values were found: record number {data($recnum2)}: {data($testcdname)}={data($testcdvalue2)} - record number {data($recnum)}: {data($testcdname)}={data($testcdvalue)}
]]>
Inconsistent value for --TESTCD within --TEST, single dataset or domain - All values of Short Name of Measurement, Test or Examination (--TESTCD) should be the same for a given value of Name of Measurement, Test or Examination (--TEST)
3.1.2
3.1.3
3.2
FINDINGS
1] (: start from the second one :)
let $recnum := $record/@data:ItemGroupDataSeq
let $testcdvalue := $record/odm:ItemData[@ItemOID=$testcdoid]/@Value
(: take the previous record in the same group, and take its --TESTCD value :)
let $precrecord := $record/preceding-sibling::odm:ItemGroupData[1] (: as they come in descending order :)
let $recnum2 := $precrecord/@data:ItemGroupDataSeq
let $testcdvalue2 := $precrecord/odm:ItemData[@ItemOID=$testcdoid]/@Value
let $recnum2 := $precrecord/@data:ItemGroupDataSeq
(: when the value of--TESTCD in both records is different, report an error :)
where not($testcdvalue2 = $testcdvalue)
return Inconsistent value for {data($testcdname)} within {data($testname)}='{data($testvalue)}' in dataset {data($datasetname)}. Following values were found: record number {data($recnum2)}: {data($testcdname)}={data($testcdvalue2)} - record number {data($recnum)}: {data($testcdname)}={data($testcdvalue)}
]]>
No --BLFL variable in custom Findings domain - Baseline Flag (--BLFL) should be present in all custom Findings domains.
3.1.2
3.1.3
3.2
FINDINGS
No --BLFL variable found in custom Findings domain {data($domain)} in dataset {data($name)}
]]>
Inconsistent values for IEORRES/IECAT - I/E Criterion Original Result (IEORRES) must equal 'Y', when Inclusion/Exclusion Category (IECAT) is 'EXCLUSION'
3.1.2
3.1.3
3.2
IE
Inconsistent values for IEORRES/IECAT. For IECAT=EXCLUSION, IEORRES must be 'Y' but {data($ieorresvalue)} was found
]]>
Inconsistent values for IEORRES/IECAT - I/E Criterion Original Result (IEORRES) must equal 'N', when Inclusion/Exclusion Category (IECAT) is 'INCLUSION'
3.1.2
3.1.3
3.2
IE
Inconsistent values for IEORRES/IECAT. For IECAT=INCLUSION, IEORRES must be 'N' but {data($ieorresvalue)} was found
]]>
Both --DOSE and --DOSTXT values are populated - Only one of Dose (--DOSE) or Dose Description (--DOSTXT) variables must be populated on the same record
3.1.2
3.1.3
3.2
INTERVENTIONS
Both {data($dosename)} and {data($dostxtname)} values are populated
]]>
Invalid value for QLABEL - Qualifier Variable Label (QLABEL) value may have up to 40 characters
3.1.2
3.1.3
3.2
ALL
40
return Invalid value for QLABEL in dataset {data($datasetname)} - Label={data($qlabelvalue)} has more than 40 characters
]]>
Unexpected value for IDVAR/IDVARVAL - Both Identifying Variable (IDVAR) and Identifying Variable Value (IDVARVAL) should not be populated, when relating information to the Demographics (DM) domain
3.1.2
3.1.3
3.2
SUPPQUAL
Unexpected value for IDVAR/IDVARVAL: IDVAR and/or IDVARVAL are populated although RDOMAIN=DM in dataset {data($datasetname)}
]]>
Non-unique value for TAETORD within ARMCD - Order of Element within Arm (TAETORD) must have a unique value for a given value of Planned Arm Code (ARMCD) within the domain
3.1.2
3.1.3
3.2
TA
$recnum]
let $recnumnext := $nextrecord/@data:ItemGroupDataSeq
(: and look for duplicate values :)
let $taarmcdvaluenext := $nextrecord/odm:ItemData[@ItemOID=$taarmcdoid]/@Value
let $tataetordvaluenext := $nextrecord/odm:ItemData[@ItemOID=$tataetordoid]/@Value
where $taarmcdvalue = $taarmcdvaluenext and $tataetordvalue = $tataetordvaluenext
return Non-unique value for TAETORD within ARMCD. Records {data($recnum)} and {data($recnumnext)} have the same value for ARMCD={data($taarmcdvalue)} and TAETORD={data($tataetordvalue)} in TA dataset {data($tadatasetname)}
]]>
Unexpected value for ARMCD variable - Records for subjects who failed a screening or were not assigned to study treatment (ARMCD is 'SCRNFAIL' or 'NOTASSGN') should not be included in the Trial Arms (TA) or Trial Visits (TV) datasets
3.1.2
3.1.3
3.2
TA
TV
Unexpected value for ARMCD={data($armcdvalue)} in dataset {data($itemgroupdefname)} - 'SCRNFAIL' and 'NOTASSGN' are not allowed to appear in TA nor TV
]]>
Duplicate VISITNUM - The value of Visit Number (VISITNUM) variable should be unique for each record within a subject - Dataset SV
3.1.2
3.1.3
3.2
SV
$recnum][odm:ItemData[@ItemOID=$usubjidoid and @Value=$usubjidvalue]][odm:ItemData[@ItemOID=$visitnumoid and @Value=$visitnumvalue]])
where $count > 0
return Non-unique combination of USUBID and VISITNUM in dataset SV - combination of USUBJID={data($usubjidvalue)} and VISITNUM={data($visitnumvalue)} occurrs {data($count)+1} times
]]>
Missing MB dataset, when MS dataset is present
3.1.2
3.1.3
3.2
MB
MS
Document {data($mbdatasetname)} for domain MB could not be found in collection {data($base)} although document {data($msdatasetname)} is present
]]>
AESER is not 'Y', when AESOD equals 'Y' - Serious Event (AESER) variable value is expected to be 'Y', when Occurred with Overdose (AESOD) variable value equals 'Y'
3.1.2
3.1.3
3.2
AE
AESER is not 'Y', when AESOD equals 'Y', value found for AESER={data($aeservalue)}
]]>
Dataset is not present in define.xml - Datasets included in study data must be described in the data definition document (define.xml)
3.1.2
3.1.3
3.2
ALL
Dataset {data($filename)} is not present in {data($define)}
]]>
Duplicate ETCD value - The value of Element Code (ETCD) variable must be unique within Trial Elements (TE) domain
3.1.2
3.1.3
3.2
TE
$recnum]
(: and compare the value of ETCD in the record with the original one :)
let $recnum2 := $record2/@data:ItemGroupDataSeq
let $etcdvalue2 := $record2//odm:ItemData[@ItemOID=$etcdoid]/@Value
where $etcdvalue=$etcdvalue2
return Duplicate ETCD value: records {data($recnum)} and {data($recnum2)} have the same value for ETCD, value={data($etcdvalue)}
]]>
Missing RDOMAIN value in CO, when IDVAR is populated - Value of Related Domain Abbreviation (RDOMAIN) variable must be populated, when value of Identifying Variable (IDVAR) variable is populated
3.1.2
3.1.3
3.2
CO
RDOMAIN value is missing although IDVAR is populated (value={data($idvarvalue)}) in CO dataset {data($codataset)}
]]>
IDVARVAL value is populated, when RELTYPE values is populated - Variable Value (IDVARVAL) variable value should not be populated, when Relationship Type (RELTYPE) variable value is populated
3.1.2
3.1.3
3.2
RELREC
IDVARVAL value is populated (value={data($idvarvalvalue)}, when RELTYPE values is populated (value={data($reltypevalue)})
]]>
USUBJID value is populated, when RELTYPE values is populated - Unique Subject Identifier (USUBJID) variable value should not be populated, when Relationship Type (RELTYPE) variable value is populated in RELREC
3.1.2
3.1.3
3.2
RELREC
USUBJID value is populated (value={data($usubjidvalue)}), when RELTYPE values is populated (value={data($reltypevalue)}) in dataset {data($relrecdatasetname)}
]]>
Duplicate ELEMENT value - The value of Element (Description of Element) variable must be unique within Trial Elements (TE) domain
3.1.2
3.1.3
3.2
TE
$recnum]
(: and compare the value of ELEMENT in the record with the original one :)
let $recnum2 := $record2/@data:ItemGroupDataSeq
let $elementvalue2 := $record2//odm:ItemData[@ItemOID=$elementoid]/@Value
where $elementvalue=$elementvalue2
return Duplicate ELEMENT value: records {data($recnum)} and {data($recnum2)} have the same value for ELEMENT, value={data($elementvalue)}
]]>
Inconsistent value for --PARM within --PARMCD - All values of a Parameter (--PARM) variables should be the same for a given value of a Parameter Short Name (--PARMCD) variables - TS domain
3.1.2
3.1.3
3.2
TS
$recnum][odm:ItemData[@ItemOID=$tsparmcdoid and @Value=$tsparmcdvalue1]]
let $recnum2 := $record2/@data:ItemGroupDataSeq
(: let $tsparmcdvalue2 := $record/odm:ItemData[@ItemOID=$tsparmcdoid]/@Value :)
let $tsparmvalue2 := $record2/odm:ItemData[@ItemOID=$tsparmoid]/@Value
(: and compare the values - both must be equal :)
where not($tsparmvalue1=$tsparmvalue2)
return Inconsistent value for --PARM within --PARMCD: both records {data($recnum)} and {data($recnum2)} have --PARMCD='{data($tsparmcdvalue1)}' but the values for --PARM '{data($tsparmvalue1)}' and '{data($tsparmvalue2)}' are different
]]>
Inconsistent value for --PARMCD within --PARM - All values of a Parameter Short Name (--PARMCD) variables should be the same for a given value of a Parameter (--PARM) variables
3.1.2
3.1.3
3.2
TS
$recnum][odm:ItemData[@ItemOID=$tsparmoid and @Value=$tsparmvalue1]]
let $recnum2 := $record2/@data:ItemGroupDataSeq
let $tsparmcdvalue2 := $record2/odm:ItemData[@ItemOID=$tsparmcdoid]/@Value
(: and compare the values - both must be equal :)
where not($tsparmcdvalue1=$tsparmcdvalue2)
return Inconsistent value for --PARMCD within --PARM: both records {data($recnum)} and {data($recnum2)} have --PARM='{data($tsparmvalue1)}' but the values for --PARMCD '{data($tsparmcdvalue1)}' and '{data($tsparmcdvalue2)}' are different
]]>
Missing IDVAR value, when RDOMAIN value is provided - Value of Identifying Variable (IDVAR) variable must be populated, when Related Domain Abbreviation (RDOMAIN) variable value is provided, with the only exception of 'DM' value for RDOMAIN
3.1.2
3.1.3
3.2
RELREC
SUPPQUAL
Missing IDVAR value, when RDOMAIN value is provided, RDOMAIN={data($rdomainvalue)}
]]>
Permissible variable with missing value for all records - Permissible variable whould not be present in domain, when the variable has missing value for all records in the dataset
3.1.2
3.1.3
3.2
ALL
Permissible variable {data($variablename)} has no values for all records in dataset {data($datasetname)}
]]>
Variable is in wrong order within domain - Order of variables should be as specified by CDISC standard
3.1.2
3.1.3
3.2
ALL
, $identifierstimingsquery)
(: we need to split identifiers and timing variable :)
let $identifiers := $identifierstimingsresponse/json//classVariables/*[role='Identifier']/name/text()
let $timings := $identifierstimingsresponse/json//classVariables/*[role='Timing']/name/text()
(: Use the CDISC Library to get all Interventions variables :)
let $interventionsquery := concat($cdisclibrarybase,'Interventions')
let $interventionsresponse := http:send-request(, $interventionsquery)
let $interventions := $interventionsresponse/json//classVariables/*/name/text()
(: Use the CDISC Library to get all Events variables :)
let $eventsquery := concat($cdisclibrarybase,'Events')
let $eventsresponse := http:send-request(, $eventsquery)
let $events := $eventsresponse/json//classVariables/*/name/text()
(: Use the CDISC Library to get all Events variables :)
let $findingsquery := concat($cdisclibrarybase,'Findings')
let $findingsesponse := http:send-request(, $findingsquery)
let $findings := $findingsesponse/json//classVariables/*/name/text()
(: Use the CDISC Library to get all FindingsAbout variables :)
let $findingsaboutquery := concat($cdisclibrarybase,'FindingsAbout')
let $findingsaboutresponse := http:send-request(, $findingsaboutquery)
let $findingsabout := $findingsaboutresponse/json//classVariables/*/name/text()
(: Use the CDISC Library to get all SpecialPurpose variables :)
(: ATTENTION: these are organized per dataset! :)
let $specialpurposequery := concat($cdisclibrarybase,'SpecialPurpose')
let $specialpurposeresponse := http:send-request(, $specialpurposequery)
let $specialpurpose := $specialpurposeresponse/json//datasets
(: Use the CDISC Library to get all TrialDesign variables :)
(: ATTENTION: these are organized per dataset! :)
let $trialdesignquery := concat($cdisclibrarybase,'TrialDesign')
let $trialdesignresponse := http:send-request(, $trialdesignquery)
(: Remark that we do NOT go into the individual datasets YET :)
let $trialdesign := $trialdesignresponse/json//datasets
(: Use the CDISC Library to get all TrialDesign variables :)
(: ATTENTION: these are organized per dataset! :)
let $relastionshipquery := concat($cdisclibrarybase,'Relationship')
let $relationshipresponse := http:send-request(, $relastionshipquery)
let $relationship := $relationshipresponse/json//datasets
(: Use the CDISC Library to get all AssociatedPersons variables :)
let $associatedpersonsquery := concat($cdisclibrarybase,'AssociatedPersons')
let $associatedpersonsresponse := http:send-request(, $associatedpersonsquery)
let $associatedpersonsclassVariables := $associatedpersonsresponse/json//classVariables/*/name/text()
let $associatedpersonsdatasetVariables := $associatedpersonsresponse/json//datasetVariables/*/name/text()
(: iterate over all dataset definitions, and get the class, name and domain :)
for $itemgroupdef in $definedoc//odm:ItemGroupDef
let $defclass := (
if($defineversion='2.1') then $itemgroupdef/def21:Class/@Name
else $itemgroupdef/@def:Class
)
let $name := $itemgroupdef/@Name
let $domain := (
if(starts-with($name,'SUPP')) then 'SUPPQUAL'
else if($itemgroupdef/@Domain) then $itemgroupdef/@Domain
else if($itemgroupdef/@Name='RELREC') then 'RELREC'
else substring($itemgroupdef/@Name,1,2)
)
(: get the variable name :)
let $variables := (
for $varoid in $itemgroupdef/odm:ItemRef/@ItemOID
return $definedoc//odm:ItemDef[@OID=$varoid]/@Name
)
(: now comes the different part: check the order :)
(: depending on the class, create an ordered array of the variables that are applicable :)
(: Read the def:Class, if incorrect, set cdisclibraryclass to 'UNKNOWN' :)
let $cdisclibraryclass := (
if(upper-case($defclass)='INTERVENTIONS') then 'Interventions'
else if (upper-case($defclass)='EVENTS') then 'Events'
else if (upper-case($defclass)='FINDINGS') then 'Findings'
else if (upper-case($defclass)='FINDINGS ABOUT' or upper-case($defclass)='FINDINGSABOUT') then 'FindingsAbout'
else if (upper-case($defclass)='SPECIAL PURPOSE' or upper-case($defclass)='SPECIALPURPOSE') then 'SpecialPurpose'
else if (upper-case($defclass)='TRIALDESIGN' or upper-case($defclass)='TRIAL DESIGN') then 'TrialDesign'
else if (upper-case($defclass)='RELATIONSHIP') then 'Relationship'
else 'UNRECOGNIZED'
)
let $orderedvariables := (
if($cdisclibraryclass = 'Events') then
functx:value-union(functx:value-union($identifiers,$interventions),$timings)
else if($cdisclibraryclass = 'Events') then
functx:value-union(functx:value-union($identifiers,$events),$timings)
else if($cdisclibraryclass = 'Findings') then
functx:value-union(functx:value-union($identifiers,$findings),$timings)
else if($cdisclibraryclass = 'TrialDesign') then
$trialdesign/*[./name=$domain]/datasetVariables/*/name
else if($cdisclibraryclass = 'Relationship') then
$relationship/*[./name=$domain]/datasetVariables/*/name
else if($cdisclibraryclass = 'SpecialPurpose') then
$specialpurpose/*[./name=$domain]/datasetVariables/*/name
else ()
)
(: we need to replace '--' by the domain name :)
let $orderedvars := local:replacedash($orderedvariables,$domain)
(: check whether the variables from the define.xml is a subset of the list of domain variables :)
let $issubset := local:compare($orderedvars,$variables)
where not($issubset)
return Variable order is not correct for class '{$cdisclibraryclass}': found = {data($variables)} - expected = {$orderedvars}
]]>
Missing --DY variable, when --DTC variable is present - Collection Study Day (--DY) variable should be included into dataset, when Collection Study Date/Time (--DTC) variable is present
3.1.2
3.1.3
3.2
ALL
Collection Study Day {data(concat($name,'DY'))} variable must be included into dataset, when Collection Study Date/Time {data($dtcname)} variable is present in dataset {data($datasetname)}
]]>
--DY variable value is not populated - Collection Study Day (--DY) variable value should be populated, when Collection Study Date/Time (--DTC) and Subject Reference Start Date/Time (RFSTDTC) variables values are provided, and both of them include complete date part.
3.1.2
3.1.3
3.2
ALL
= 10 (: boolean :)
(: look up the record in the DM dataset and get the RFSTDTC :)
(: keeping worst case scenario into account that there are two records for the same USUBJID in DM - take the first :)
let $rfstdtcvalue := doc($dmdatasetlocation)//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$usubjidvalue]][1]/odm:ItemData[@ItemOID=$rfstdtcoid]/@Value
(: and check whether also RFSTDTC is complete :)
let $iscompleterfstdtcvalue := string-length($rfstdtcvalue) >= 10 (: boolean :)
(: when both RFSTDTC and xxDTC are complete, there MUST be a xxDY value :)
let $dyvalue := $record/odm:ItemData[@ItemOID=$dyoid]/@Value
where $iscompletedtcvalue and $iscompleterfstdtcvalue and not($dyvalue)
return {data($dyname)} is not populated although both {data($dtcname)} (value={data($dtcvalue)}) and RFSTDTC (value={data($rfstdtcvalue)}) are provided and include a complete date part
]]>
--DY variable value is imputed - It may be only populated, when both Collection Study Date/Time (--DTC) and Subject Reference Start Date/Time (RFSTDTC) variables values are provided and both of them include complete date part
3.1.2
3.1.3
3.2
ALL
= 10 (: boolean :)
(: look up the record in the DM dataset and get the RFSTDTC :)
(: keeping worst case scenario into account that there are two records for the same USUBJID in DM - take the first :)
let $rfstdtcvalue := doc($dmdatasetlocation)//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$usubjidvalue]][1]/odm:ItemData[@ItemOID=$rfstdtcoid]/@Value
(: and check whether also RFSTDTC is complete :)
let $iscompleterfstdtcvalue := string-length($rfstdtcvalue) >= 10 (: boolean :)
let $dyvalue := $record/odm:ItemData[@ItemOID=$dyoid]/@Value
(: when one of RFSTDTC and xxDTC is not complete, there may NOT be a xxDY value :)
where (not($iscompletedtcvalue) or not($iscompleterfstdtcvalue)) and $dyvalue
return {data($dyname)} is imputed (value={data($dyvalue)}) although one of {data($dtcname)} (value={data($dtcvalue)}) or RFSTDTC (value={data($rfstdtcvalue)}) is not a complete date
]]>
Incorrect value for --DY variable - Collection Study Day (--DY) variable value should be populated as defined by CDISC standards: --DY = (date portion of --DTC) - (date portion of RFSTDTC) +1 if --DTC is on or after RFSTDTC; --DY = (date portion of --DTC) - (date portion of RFSTDTC) if --DTC precedes RFSTDTC.
3.1.2
3.1.3
3.2
ALL
= 10 (: boolean :)
(: look up the record in the DM dataset and get the RFSTDTC :)
(: keeping worst case scenario into account that there are two records for the same USUBJID in DM - take the first :)
let $rfstdtcvalue := $dmdatasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$usubjidvalue]][1]/odm:ItemData[@ItemOID=$rfstdtcoid]/@Value
(: and check whether also RFSTDTC is complete :)
let $iscompleterfstdtcvalue := string-length($rfstdtcvalue) >= 10 (: boolean :)
let $dyvalue := $record/odm:ItemData[@ItemOID=$dyoid]/@Value
(: now calculate the DY value but only when RFSTDTC and DTC have a complete date part :)
let $dycalculated := (
if ($iscompleterfstdtcvalue and $iscompletedtcvalue) then
(: if there is one, we must strip off the time part :)
let $dtcvalueshort := substring($dtcvalue,1,10)
let $rfstdtcvalueshort := substring($rfstdtcvalue,1,10)
let $dycalc := (
if($dtcvalueshort castable as xs:date and $rfstdtcvalueshort castable as xs:date) then
days-from-duration(xs:date($dtcvalueshort)-xs:date($rfstdtcvalueshort))
else()
)
return $dycalc
else () (: one or both dates are not complete dates :)
)
(: for the FDA there is no day 0, DY can only be <0 or >0, first day is day 1 :)
let $dycalculatedfda := (
if($dycalculated >= 0) then
$dycalculated + 1
else (
$dycalculated
)
)
(: before comparing, check that the DY value is really an integer :)
where $dyvalue castable as xs:integer and $dycalculatedfda and $dyvalue and not($dycalculatedfda = $dyvalue)
return Invalid value for {data($dyname)}, calculated value={data($dycalculatedfda)}, observed value={data($dyvalue)}, in dataset {data($name)}
]]>
Missing --STDY variable, when --STDTC variable is present - Study Day of Start (--STDY) variable should be included into dataset, when Start Study Date/Time (--STDTC) variable is present
3.1.2
3.1.3
3.2
ALL
Missing {data($stdyname)} variable in dataset {data($datasetname)}, when {data($stdtcname)} variable is present
]]>
--STDY variable value is not populated - Study Day of Start (--STDY) variable value should be populated, when Start Study Date (--STDTC) and Subject Reference Start Date/Time (RFSTDTC) variables values are provided, and both of them include complete date part.
3.1.2
3.1.3
3.2
ALL
= 10 (: boolean :)
(: get the USUBJID and get the corresponding RFSTDTC in the DM dataset :)
let $usubjidvalue := $record/odm:ItemData[@ItemOID=$usubjidoid]/@Value
(: keeping the worst case scenario into account that there is more than 1 record for a USUBJID in DM - take the first :)
let $rfstdtcvalue := doc($dmdatasetlocation)//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$usubjidvalue]][1]/odm:ItemData[@ItemOID=$rfstdtcoid]/@Value
(: and check whether RFSTDTC is a complete date :)
let $iscompleterfstdtcdate := string-length($rfstdtcvalue) >= 10
(: Get the value of the STDY variable (if any) :)
let $stdyvalue := $record/odm:ItemData[@ItemOID=$stdyoid]/@Value
(: STDY MUST be populated when the variable is in the dataset and when both RFSTDTC AND STDTC are complete dates :)
where $stdyoid and $iscompletestdtcdate and $iscompleterfstdtcdate and not($stdyvalue)
return {data($stdyname)} variable is not populated although both {data($stdtcname)} (value={data($stdtcvalue)}) and RFSTDTC (value={data($rfstdtcvalue)}) are complete dates
]]>
--STDY variable value is imputed - Study Day of Start (--STDY) variable value should be not be imputed. It may be only populated, when both Start Study Date/Time (--STDTC) and Subject Reference Start Date/Time (RFSTDTC) variables values are provided, and both of them include complete date part.
3.1.2
3.1.3
3.2
ALL
= 10 (: boolean :)
(: get the USUBJID and get the corresponding RFSTDTC in the DM dataset :)
let $usubjidvalue := $record/odm:ItemData[@ItemOID=$usubjidoid]/@Value
(: taking the worst case scenario into account that there is more than one record for a USUBJID in DM - take the first one :)
let $rfstdtcvalue := doc($dmdatasetlocation)//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$usubjidvalue]][1]/odm:ItemData[@ItemOID=$rfstdtcoid]/@Value
(: and check whether RFSTDTC is a complete date :)
let $iscompleterfstdtcdate := string-length($rfstdtcvalue) >= 10
(: Get the value of the STDY variable (if any) :)
let $stdyvalue := $record/odm:ItemData[@ItemOID=$stdyoid]/@Value
(: STDY may NOT be populated when of RFSTDTC or STDTC is an incomplete date :)
where $stdyoid and (not($iscompletestdtcdate) or not($iscompleterfstdtcdate)) and $stdyvalue
return {data($stdyname)} variable value {data($stdyvalue)} is imputed although one of {data($stdtcname)} (value={data($stdtcvalue)}) or RFSTDTC (value={data($rfstdtcvalue)}) is not a complete date
]]>
--STDY variable value is imputed, single dataset or domain - Study Day of Start (--STDY) variable value should be not be imputed. It may be only populated, when both Start Study Date/Time (--STDTC) and Subject Reference Start Date/Time (RFSTDTC) variables values are provided, and both of them include complete date part.
3.1.2
3.1.3
3.2
ALL
= 10 (: boolean :)
(: get the USUBJID and get the corresponding RFSTDTC in the DM dataset :)
let $usubjidvalue := $record/odm:ItemData[@ItemOID=$usubjidoid]/@Value
(: taking the worst case scenario into account that there is more than one record for a USUBJID in DM - take the first one :)
let $rfstdtcvalue := doc($dmdatasetlocation)//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$usubjidvalue]][1]/odm:ItemData[@ItemOID=$rfstdtcoid]/@Value
(: and check whether RFSTDTC is a complete date :)
let $iscompleterfstdtcdate := string-length($rfstdtcvalue) >= 10
(: Get the value of the STDY variable (if any) :)
let $stdyvalue := $record/odm:ItemData[@ItemOID=$stdyoid]/@Value
(: STDY may NOT be populated when of RFSTDTC or STDTC is an incomplete date :)
where $stdyoid and (not($iscompletestdtcdate) or not($iscompleterfstdtcdate)) and $stdyvalue
return {data($stdyname)} variable value {data($stdyvalue)} is imputed although one of {data($stdtcname)} (value={data($stdtcvalue)}) or RFSTDTC (value={data($rfstdtcvalue)}) is not a complete date
]]>
Incorrect value for --STDY variable - Study Day of Start (--STDY) variable value should be populated as defined by CDISC standards: --STDY = (date portion of --STDTC) - (date portion of RFSTDTC) +1 if --STDTC is on or after RFSTDTC; --STDY = (date portion of --STDTC) - (date portion of RFSTDTC) if --STDTC precedes RFSTDTC
3.1.2
3.1.3
3.2
ALL
= 10 (: boolean :)
(: look up the record in the DM dataset and get the RFSTDTC :)
(: taking the worst case scenario into account that there is more than one record for a USUBJID in DM - take the first one :)
let $rfstdtcvalue := doc($dmdatasetlocation)//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$usubjidvalue]][1]/odm:ItemData[@ItemOID=$rfstdtcoid]/@Value
(: and check whether also RFSTDTC is complete :)
let $iscompleterfstdtcvalue := string-length($rfstdtcvalue) >= 10 (: boolean :)
let $stdyvalue := $record/odm:ItemData[@ItemOID=$stdyoid]/@Value
(: now calculate the DY value but only when RFSTDTC and STDTC have a complete date part :)
let $stdycalculated := (
if ($iscompleterfstdtcvalue and $iscompletestdtcvalue) then
(: if there is one, we must strip off the time part :)
let $stdtcvalueshort := substring($stdtcvalue,1,10)
let $rfstdtcvalueshort := substring($rfstdtcvalue,1,10)
let $stdycalc := (
if($stdtcvalueshort castable as xs:date and $rfstdtcvalueshort castable as xs:date) then
days-from-duration(xs:date($stdtcvalueshort)-xs:date($rfstdtcvalueshort))
else()
)
return $stdycalc
else () (: one or both dates are not complete dates :)
)
(: for the FDA there is no day 0, DY can only be <0 or >0, first day is day 1 :)
let $stdycalculatedfda := (
if($stdycalculated >= 0) then
$stdycalculated + 1
else (
$stdycalculated
)
)
(: before comparing, also check whether the value is really an integer :)
where $stdyvalue castable as xs:integer and $stdycalculatedfda and $stdyvalue and not($stdycalculatedfda = $stdyvalue)
return Invalid value for {data($stdyname)}, calculated value={data($stdycalculatedfda)}, observed value={data($stdyvalue)}, in dataset {data($name)}
]]>
Missing --ENDY variable, when --ENDTC variable is present - Study Day of End (--ENDY) variable should be included into dataset, when End Study Date/Time (--ENDTC) variable is present
3.1.2
3.1.3
3.2
ALL
Missing {data($endyname)} variable in dataset {data($datasetname)}, when {data($endtcname)} variable is present
]]>
--ENDY variable value is not populated - Study Day of End (--ENDY) variable value should be populated, when End Study Date/Time (--ENDTC) and Subject Reference Start Date/Time (RFSTDTC) variables values are provided, and both of them include complete date part
3.1.2
3.1.3
3.2
ALL
= 10 (: boolean :)
(: get the USUBJID and get the corresponding RFSTDTC in the DM dataset :)
let $usubjidvalue := $record/odm:ItemData[@ItemOID=$usubjidoid]/@Value
(: taking the worst case scenario into account that there is more than 1 record for a USUBJID in DM - take the first one :)
let $rfstdtcvalue := doc($dmdatasetlocation)//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$usubjidvalue]][1]/odm:ItemData[@ItemOID=$rfstdtcoid]/@Value
(: and check whether RFSTDTC is a complete date :)
let $iscompleterfstdtcdate := string-length($rfstdtcvalue) >= 10
(: Get the value of the STDY variable (if any) :)
let $endyvalue := $record/odm:ItemData[@ItemOID=$endyoid]/@Value
(: ENDY MUST be populated when the variable is in the dataset and when both ENSTDTC AND ENDTC are complete dates :)
where $endyoid and $iscompleteendtcdate and $iscompleterfstdtcdate and not($endyvalue)
return {data($endyname)} variable is not populated although both {data($endtcname)} (value={data($endtcvalue)}) and RFSTDTC (value={data($rfstdtcvalue)}) are complete dates
]]>
--ENDY variable value is imputed - Study Day of End (--ENDY) variable value should be not be imputed. It may be only populated, when both End Study Date/Time (--ENDTC) and Subject Reference Start Date/Time (RFSTDTC) variables values are provided, and both of them include complete date part
3.1.2
3.1.3
3.2
ALL
= 10 (: boolean :)
(: get the USUBJID and get the corresponding RFSTDTC in the DM dataset :)
let $usubjidvalue := $record/odm:ItemData[@ItemOID=$usubjidoid]/@Value
(: taking worst case scenario into account that there is more than 1 record for a USUBJID in DM - take the first one :)
let $rfstdtcvalue := doc($dmdatasetlocation)//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$usubjidvalue]][1]/odm:ItemData[@ItemOID=$rfstdtcoid]/@Value
(: and check whether RFSTDTC is a complete date :)
let $iscompleterfstdtcdate := string-length($rfstdtcvalue) >= 10
(: Get the value of the STDY variable (if any) :)
let $endyvalue := $record/odm:ItemData[@ItemOID=$endyoid]/@Value
(: ENDY may NOT be populated when of RFSTDTC or ENDTC is an incomplete date :)
where $endyoid and (not($iscompletestdtcdate) or not($iscompleterfstdtcdate)) and $endyvalue
return {data($endyname)} variable value {data($endyvalue)} is imputed although one of {data($endtcname)} (value={data($endtcvalue)}) or RFSTDTC (value={data($rfstdtcvalue)}) is not a complete date
]]>
Incorrect value for --ENDY variable - Study Day of End (--ENDY) variable value should be populated as defined by CDISC standards: --ENDY = (date portion of --STDTC) - (date portion of RFSTDTC) +1 if --ENDTC is on or after RFSTDTC; --ENTDY = (date portion of --ENDTC) - (date portion of RFSTDTC) if --ENDTC precedes RFSTDTC
3.1.2
3.1.3
3.2
ALL
= 10 (: boolean :)
(: look up the record in the DM dataset and get the RFSTDTC :)
(: taking worst case scenario into account that there is more than 1 record for a USUBJID in DM - take the first one :)
let $rfstdtcvalue := doc($dmdatasetlocation)//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$usubjidvalue]][1]/odm:ItemData[@ItemOID=$rfstdtcoid]/@Value
(: and check whether also RFSTDTC is complete :)
let $iscompleterfstdtcvalue := string-length($rfstdtcvalue) >= 10 (: boolean :)
let $endyvalue := $record/odm:ItemData[@ItemOID=$endyoid]/@Value
(: now calculate the DY value but only when RFSTDTC and ENDTC have a complete date part :)
let $endycalculated := (
if ($iscompleterfstdtcvalue and $iscompletestdtcvalue) then
(: if there is one, we must strip off the time part :)
let $endtcvalueshort := substring($endtcvalue,1,10)
let $rfstdtcvalueshort := substring($rfstdtcvalue,1,10)
let $endycalc := (
if($endtcvalueshort castable as xs:date and $rfstdtcvalueshort castable as xs:date) then
days-from-duration(xs:date($endtcvalueshort)-xs:date($rfstdtcvalueshort))
else()
)
return $endycalc
else () (: one or both dates are not complete dates :)
)
(: for the FDA there is no day 0, DY can only be <0 or >0, first day is day 1 :)
let $endycalculatedfda := (
if($endycalculated >= 0) then
$endycalculated + 1
else $endycalculated
)
(: before comparing, check that the ENDY value is really an integer :)
where $endyvalue castable as xs:integer and $endycalculatedfda and $endyvalue and not($endycalculatedfda = $endyvalue)
return Invalid value for {data($endyname)}, calculated value={data($endycalculatedfda)}, observed value={data($endyvalue)}, in dataset {data($datasetname)}
]]>
Invalid dataset name for split domain - Split datasets must not have name of original domain. E.g., lbhm.xpt is a valid name, when lb.xpt is not a valid dataset name for split domain.
3.1.2
3.1.3
3.2
ALL
1 and not(string-length(substring-before($filename,'.')) > 2)
(: filenames should have >2 characters before the dot :)
return Split dataset {data($name)} has a file name '{data($filename)}' that is typical for non-split datasets
]]>
High risk of truncated value for --TERM variable - SAS v5 export format has a limitation on variables length up to 200 characters. If collected value was more than 200 characters, then SUPPQUAL dataset should be used to store additional 200+ characters. Variable QNAM should have --TERM1, ---TERM2, etc. values for those records. Value splitting should be performed between words or numbers. See SDTM IG #4.1.5.3.2 for details. This risk-assessment check is triggered based on assumption that if original value was truncated, then the actual data value length is exactly 200 characters.
3.1.2
3.1.3
3.2
ALLThis rule is nonsense! The "risk" is not computable
]]>
Missing --CAT value, when --SCAT value is populated - Value for Category (--CAT) variable should be populated, when value for Subcategory (--SCAT) variable is populated
3.1.2
3.1.3
3.2
ALL
Missing {data($catname)} value, when {data($scatname)} value is populated
]]>
Missing --CAT variable, when --SCAT variable is present - Category (--CAT) variable should be included into dataset, when Subcategory (--SCAT) variable is present
3.1.2
3.1.3
3.2
ALL
Missing {data($catname)} variable, when {data($scatname)} variable is present
]]>
Missing --ENTPT variable, when --ENRTPT variable is present - End Reference Time Point (--ENTPT) variable must be included into the domain, when End Relative to Reference Time Point (--ENRTPT) variable is present
3.1.2
3.1.3
3.2
ALL
Missing {data($entptname)} variable, when {data($enrtptname)} variable is present
]]>
Missing --ENRTPT variable, when --ENTPT variable is present - End Reference to Reference Time Point (--ENRTPT) variable must be included into the domain, when End Relative Time Point (--ENTPT) variable is present
3.1.2
3.1.3
3.2
ALL
Missing {data($enrtptname)} variable, when {data($entptname)} variable is present
]]>
Missing --STTPT variable, when --STRTPT variable is present - Start Reference Time Point (--STTPT) variable must be included into the domain, when Start Relative to Reference Time Point (--STRTPT) variable is present
3.1.2
3.1.3
3.2
ALL
Missing {data($sttptname)} variable, when {data($strtptname)} variable is present
]]>
Missing --STRTPT variable, when --STTPT variable is present - Start Reference to Reference Time Point (--STRTPT) variable must be included into the domain, when Start Relative Time Point (--STTPT) variable is present
3.1.2
3.1.3
3.2
ALL
Missing {data($strtptname)} variable, when {data($sttptname)} variable is present
]]>
Missing AE dataset - Adverse Events (AE) dataset should be included in every submission
3.1.2
3.1.3
3.2
AE
Document {data($aedatasetname)} could not be found in collection {data($base)}
]]>
Missing LB dataset - Lab Test Results (LB) dataset should be included in every submission
3.1.2
3.1.3
3.2
LB
Document {data($lbdatasetname)} could not be found in collection/file {data($base)}
]]>
Missing VS dataset - Vital Signs (VS) dataset should be included in every submission
3.1.2
3.1.3
3.2
VS
Document {data($vsdatasetname)} could not be found in collection {data($base)}
]]>
Missing EX dataset - Exposure (EX) dataset should be included in every submission
3.1.2
3.1.3
3.2
EX
Document {data($exdatasetname)} could not be found in collection {data($base)}
]]>
Missing DS dataset - Disposition (DS) dataset should be included in every submission
3.1.2
3.1.3
3.2
DS
Document {data($dsdatasetname)} could not be found in collection {data($base)}
]]>
Missing SE dataset - Subject Elements (SE) dataset should be included in every submission
3.1.2
3.1.3
3.2
SE
Document {data($sedatasetname)} could not be found in collection {data($base)}
]]>
Missing TA dataset - Trial Arms (TA) dataset should be included in every submission
3.1.2
3.1.3
3.2
TA
Document {data($tadatasetname)} could not be found in collection {data($base)}
]]>
Missing TE dataset - Trial Elements (TE) dataset should be included in every submission
3.1.2
3.1.3
3.2
TE
Document {data($tedatasetname)} could not be found in collection {data($base)}
]]>
Value for --BODSYS not found in MedDRA dictionary - Value for Body System or Organ Class (--BODSYS) variable must be populated using a System Organ Class of the MedDRA dictionary of a version specified in the define.xml (Case-insensitive).
3.1.2
3.1.3
3.2
AE
MH
CE
Value '{data($bodsysvalue)}' for {data($bodsysname)} was not found in the MedDRA dictionary
]]>
Case for --BODSYS is in incorrect case - Case for Body System or Organ Class (--BODSYS) variable must follow MedDRA sentence case and be populated using a System Organ Class of the MedDRA dictionary of a version specified in the define.xml (Case-sensitive).
3.1.2
3.1.3
3.2
AE
MH
CE
Value '{data($bodsysvalue)}' for {data($bodsysname)} is in incorrect case from the MedDRA dictionary
]]>
Missing TS dataset - Trial Summary (TS) dataset must be included in every submission
3.1.2
3.1.3
3.2
TS
Document {data($tsdatasetname)} could not be found in collection {data($base)}
]]>
Inconsistent variable length within split datasets - Split datasets should have matching variable lengths for future merges. Datasets should be resized to the maximum length used prior to splitting
3.1.2
3.1.3
3.2
ALL
1, get the variables, and compare the @Length attributes
Should be checked completely on the define.xml level
:)
xquery version "3.0";
declare namespace def = "http://www.cdisc.org/ns/def/v2.0";
declare namespace def21 = "http://www.cdisc.org/ns/def/v2.1";
declare namespace odm="http://www.cdisc.org/ns/odm/v1.3";
declare namespace data="http://www.cdisc.org/ns/Dataset-XML/v1.0";
declare namespace xlink="http://www.w3.org/1999/xlink";
declare namespace request="http://exist-db.org/xquery/request";
(: "declare variable ... external" allows to pass $base and $define from an external programm :)
declare variable $base external;
declare variable $define external;
declare variable $defineversion external;
(: let $base := '/db/fda_submissions/cdisc01/' :)
(: let $define := 'define2-0-0-example-sdtm.xml' :)
let $definedoc := doc(concat($base,$define))
(: get the splitted domains by domain name :)
let $splitteddomainnames := (
for $itemgroupdef in $definedoc//odm:ItemGroupDef
let $domain := $itemgroupdef/@Domain
let $countsplitteddatasets := count($definedoc//odm:ItemGroupDef[@Domain=$domain])
where $countsplitteddatasets > 1
return $domain
)
(: $splitteddomainnames will always contain duplicates, we need the unique values :)
let $splitteddomainnames := distinct-values($splitteddomainnames)
(: iterate over the domains for which there are splitted domains :)
for $domain in $splitteddomainnames
(: get the variable OIDs for all the variables from the current set of splitted domains:)
let $variableoids := $definedoc//odm:ItemGroupDef[@Domain=$domain]/odm:ItemRef/@ItemOID
(: iterate over all the variables by their OID :)
for $variableoid at $pos in $variableoids
(: get the ItemDef and the value of the Length attribute (if any) :)
let $variablelength := $definedoc//odm:ItemDef[@OID=$variableoid]/@Length
let $variablename := $definedoc//odm:ItemDef[@OID=$variableoid]/@Name
(: get ALL other variables of the same and other dataset instances with the same NAME :)
for $variableoid2 in $variableoids[position()>$pos]
(: again, get the name and value of the Length attribute :)
let $variablelength2 := $definedoc//odm:ItemDef[@OID=$variableoid2]/@Length
let $variablename2 := $definedoc//odm:ItemDef[@OID=$variableoid2]/@Name
(: test whether the 2 variable OIDs belong to the same variable name,
and give an error when the lengths are different :)
where $variablename = $variablename2 and $variablelength and $variablelength2 and $variablelength!=$variablelength2
return Inconsistent variable length within split datasets. Variable {data($variablename)} with OID {data($variableoid)} has a length of {data($variablelength)} whereas the same variable but with OID {data($variableoid2)} has a length of {data($variablelength2)} defined in the define.xml
]]>
Duplicate records - The structure of Findings class domains should be one records per Finding Result per subject. No Finding Result with the same Test Short Name (--TESTCD) for the same Subject (USUBJID) and the same Collection Date (--DTC) are expected
3.1.2
3.1.3
3.2
FINDINGS
$recnum][odm:ItemData[@ItemOID=$usubjidoid and @Value=$usubjid]][odm:ItemData[@ItemOID=$testcdoid and @Value=$testcd]][odm:ItemData[@ItemOID=$dtcoid and @Value=$dtc]])
where $count > 0
return Duplicate Finding Result with the same Test Short Name {data($testcdname)}={data($testcd)} for the same Subject USUBJID={data($usubjid)} and the same Collection Date {data($dtcname)}={data($dtc)} found in dataset {data($datasetname)}. Number of occurrences of this combination is {data($count+1)}
]]>
Duplicate records - The structure of Findings class domains should be one records per Finding Result per subject. No Finding Result with the same Test Short Name (--TESTCD) for the same Subject (USUBJID) and the same Collection Date (--DTC) are expected
3.1.2
3.1.3
3.2
FINDINGS
$recnum][odm:ItemData[@ItemOID=$usubjidoid and @Value=$usubjid]][odm:ItemData[@ItemOID=$testcdoid and @Value=$testcd]][odm:ItemData[@ItemOID=$dtcoid and @Value=$dtc]])
where $count > 0
return Duplicate Finding Result with the same Test Short Name {data($testcdname)}={data($testcd)} for the same Subject USUBJID={data($usubjid)} and the same Collection Date {data($dtcname)}={data($dtc)} found in dataset {data($datasetname)}. Number of occurrences of this combination is {data($count+1)}
]]>
Neither --STDTC, --DTC nor --STDY are populated - At least one value of three variables Start Date/Time (--STDTC), Collection Date/Time (--DTC) or Start Study Day (--STDY) should be populated.
3.1.2
3.1.3
3.2
FINDINGS
{data($dsstdtcoid)} - {data($dsdtcoid)} - {data($dsstdyoid)} :)
for $record in $dsdatasetdoc//odm:ItemGroupData
let $recnum := $record/@data:ItemGroupDataSeq
(: get the values of DSSTDTC, DSDTC and DSSTDY - if any :)
let $dsstdtcvalue := $record/odm:ItemData[@ItemOID=$dsstdtcoid]/@Value
let $dsdtcvalue := $record/odm:ItemData[@ItemOID=$dsdtcoid]/@Value
let $dsstdyoid := $record/odm:ItemData[@ItemOID=$dsstdyoid]/@Value
(: and create an error when all 3 are absent :)
where not($dsstdtcvalue) and not($dsdtcvalue) and not($dsstdyoid)
return Neither DSSTDTC, DSDTC nor DSSTDY are populated in dataset DS
]]>
Inappropriate usage of variables in CO domain - In Comments (CO) domain, only following Identifier and Timing variables that are permissible and may be added as appropriate when comments are not related to other domain records (RDOMAIN and IDVAR variables values are not populated): COGRPID, COREFID, COSPID, VISIT, VISITNUM, VISITDY, TAETORD, CODY, COTPT, COTPTNUM, COELTM, COTPTREF, CORFTDTC
3.1.2
3.1.3
3.2
ALL
Variable {data($varname)} is not allowed in the CO dataset
]]>
Neither of AGE or AGETXT variables values are populated - Value for Age (AGE) of Age Range (AGETXT) variables should be populated for all subjects with only exception for Screen Failures (ARMCD=SCRNFAIL) and Not Assigned (ARMCD=NOTASSGN) subejcts
3.1.3
3.2
DM
Neither of AGE or AGETXT variables values are populated
]]>
Missing value for --STRESN - Standardized Result in Numeric Format (--STRESN) variable value should be populated, when Standardized Result in Character Format (--STRESC) variable value represents a numeric value
3.1.2
3.1.3
3.2
FINDINGS
Missing value for {data($stresnname)}, when {data($strescname)} value={data($strescvalue)} is provided and represents a numeric value in dataset {data($datasetname)}
]]>
--ORRES value is populated, when --STAT is 'NOT DONE' - Value of Original Result (--ORRES) variable is expected to be missing, when observation was not performed (Status (--STAT) is 'NOT DONE')
3.1.2
3.1.3
3.2
FINDINGS
Value of Original Result ({data($orresname)}) variable is expected to be missing, when observation was not performed (Status {data($statname)} is 'NOT DONE'). Value for {data($orresname)} found is '{data($orresvalue)}'
]]>
Missing value for --REASND, when --STAT is 'NOT DONE' - Value of Reason Not Done (--REASND) variable should be populated, when Status (--STAT) variable value is 'NOT DONE'
3.1.2
3.1.3
3.2
ALL
Missing value for {data($reasndname)} when {data($statname)}={data($statvalue)} in dataset {data($datasetname)}
]]>
Inconsistent value for --TPT within --ELTM - All values of Planned Elapsed Time (--ELTM) variable should be the same for a given value of Planned Time Point Name (--TPT) variable
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
FINDINGS
Inconsistent value for {data($eltmname)} within {data($tptname)} in dataset {data($datasetname)}. {data($uniqueeltmvaluescount)} different {data($eltmname)} values were found for {data($tptname)}={data($tptuniquevalue)}
]]>
Inconsistent value for --TPT within --TPTNUM - All values of Planned Time Point Name (--TPT) variable should be the same for a given value of Planned Time Point Number (--TPTNUM) variable
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
FINDINGS
Inconsistent value for {data($tptname)} within {data($tptnumname)} in dataset {data($datasetname)}. {data($uniquetptvaluescount)} different {data($tptname)} values were found for {data($tptnumname)}={data($tptnumuniquevalue)}
]]>
Inconsistent value for --TPTNUM within --TPT - All values of Planned Time Point Number (--TPTNUM) variable should be the same for a given value of Planned Time Point Name (--TPT) variable
3.1.2
3.1.3
3.2
INTERVENTIONS
FINDINGS
EVENTS
Inconsistent value for {data($tptnumname)} within {data($tptname)} in dataset {data($datasetname)}. {data($uniquetptnumvaluescount)} different {data($tptnumname)} values were found for {data($tptname)}={data($tptuniquevalue)}
]]>
Invalid value for RELTYPE variable - Relationship Type (RELTYPE) variable values should be populated with terms 'ONE', 'MANY', when Related Records (RELREC) dataset is used to identify relationships between datasets.
3.1.2
3.1.3
3.2
RELREC
Invalid value for RELTYPE variable: only 'ONE' or 'MANY' is allowed. The value '{data($value)}'was found
]]>
Neither AGE nor AGETXT variables are present - At least one of Age (AGE) or Age Text (AGETXT) variables should be inculded into Demographics (DM) domain
3.1.3
3.2
DM
Neither AGE nor AGETXT variables are present
]]>
Inconsistent value for QNAM within QLABEL - All values of Qualifier Variable Name (QNAM) should be the same for a given value of Qualifier Variable Label (QLABEL)
3.1.2
3.1.3
3.2
SUPPQUAL
Inconsistent value for QNAM within QLABEL={data($uniqueqlabel)} in dataset {data($datasetname)}. {data($uniqueqnamvaluescount)} different combinations were found
]]>
Missing --STRESC value for Baseline record - A Standard Result value (--STRESC) is expected to be populated for Baseline records (--BLFL="Y")
3.1.2
3.1.3
3.2
FINDINGS
Missing {data($strescname)}, when {data($blflname)} value={data($blflvalue)} is provided in dataset {data($datasetname)}
]]>
AESER is not 'Y' - Serious Event (AESER) variable value is expected to be 'Y', when either of Seriousness Criteria variables (AESCAN, AESCONG, AESDISAB, AESDTH, AESHOSP, AESLIFE, AESMIE) has value 'Y'.
3.1.2
3.1.3
3.2
FINDINGS
AESER is not 'Y' although one of AESCAN, AESCONG, AESDISAB, AESDTH, AESHOSP, AESLIFE and AESMIE has the value 'Y' in dataset {data($datasetname)}
]]>
Inconsistent value for ACTARM - A value for Description of Actual Arm (ACTARM) must have a unique value for Actual Arm Code (ACTARMCD) with the DM domain.
3.1.3
3.2
DM
$recnum and ItemData[@ItemOID=$actarmcdoid and @Value=$actarmcdvalue]]
let $recnum2 := $record/@data:ItemGroupDataSeq
(: give an error when the value of ACTARM in this following record is not identical to that of the prior record :)
let $actarmvalue2 := $record2/odm:ItemData[@ItemOID=$actarmoid]/@Value
where not($actarmvalue=$actarmvalue2)
return Inconsistent value for ACTARM in DM: record {data($recnum)} has ACTARMCD='{data($actarmcdvalue)}' and ACTARM='{data($actarmvalue)}' whereas record {data($recnum2)} has ACTARMCD='{data($actarmcdvalue)}' and ACTARM='{data($actarmvalue2)}'
]]>
Inconsistent value for ACTARMCD - A value for Actual Arm Code (ACTARMCD) must have a unique value for Description of Actual Arm (ACTARM) with the domain.
3.1.3
3.2
DM
$recnum and ItemData[@ItemOID=$actarmoid and @Value=$actarmvalue]]
let $recnum2 := $record/@data:ItemGroupDataSeq
(: give an error when the value of ACTARMCD in this following record is not identical to that of the prior record :)
let $actarmcdvalue2 := $record2/odm:ItemData[@ItemOID=$actarmcdoid]/@Value
where not($actarmcdvalue=$actarmcdvalue2)
return Inconsistent value for ACTARMCD in DM: record {data($recnum)} has ACTARM='{data($actarmvalue)}' and ACTARMCD='{data($actarmcdvalue)}' whereas record {data($recnum2)} has ACTARM='{data($actarmvalue)}' and ACTARMCD='{data($actarmcdvalue2)}'
]]>
Negative value of *DY variable - Study Day variables (*DY) value should not be negative in Exposure (EX) datasets.
3.1.2
3.1.3
3.2
EX
Negative value of Variable {data($dyname)}: {data($dyvalue)} was found
]]>
Non-missing value for --ORRES, when --DRVFL='Y' - Character Result/Finding in Original Units (--ORRES) value should be NULL, when Derived Flag (--DRVFL) value is 'Y'.
3.1.2
3.1.3
3.2
FINDINGS
Non-missing value for {data($orresname)}, when {data($drvflname)}='Y' - a value of '{data($orresvalue)}' for {data($orresname)} was found
]]>
Dataset is greater than 5 GB in size - eXist-specific - Applicant should consult the PMDA beforehand if the dataset exceeds the file size specified by PMDA.
3.1.2
3.1.3
3.2
ALL
5120
return Size of file {$child} is larger than 5GB - file size found = {$size} MB
]]>
Dataset is greater than 5 GB in size - BaseX-specific - Applicant should consult the PMDA beforehand if the dataset exceeds the file size specified by PMDA.
3.1.2
3.1.3
3.2
ALL
5120
return Size of file {data($dsname)} is larger than 5GB - file size found = {$sizemb} MB
]]>
MHSTDTC date may not be after RFSTDTC
The medical history dataset includes the subject's prior history at the start of the trial. Start Date/Time of Medical History Event (MHSTDTC) should be before Subject Reference Start Date/Time (RFSTDTC)
3.1.2
3.1.3
3.2
MH
CG0079
RFSTDTC :)
where $rfstdtc castable as xs:date and $mhstdtccomplete castable as xs:date and not(xs:date($mhstdtccomplete) <= xs:date($rfstdtc))
return MHSTDTC={data($mhstdtc)} is after or on RFSTDTC={data($rfstdtc)}
]]>
MHENDTC date may not be after RFSTDTC -
The medical history dataset includes the subject's prior history at the start of the trial. End Date/Time of Medical History Event (MHENDTC) should be before Subject Reference Start Date/Time (RFSTDTC)
3.1.2
3.1.3
3.2
MH
CG0078
RFSTDTC :)
where $rfstdtc castable as xs:date and $mhendtccomplete castable as xs:date and not(xs:date($mhendtccomplete) <= xs:date($rfstdtc))
return MHENDTC={data($mhendtc)} is after or on RFSTDTC={data($rfstdtc)}
]]>
Pre-specified (--PRESP) variable must be included into dataset, when Occurrence (--OCCUR) variable is present
3.1.2
3.1.3
3.2
EVENTS
INTERVENTIONS
Variable {data($prespname)} is not present in dataset {data($name)} although {data($occurname)} is present in the dataset
]]>
Duplicate USUBJID/--DECOD/--STDTC record - The structure of Events class domains should be one records per Event per subject. No Events with the same Collected Term (--TERM), Decoded Term (--DECOD), Category (--CAT), Subcategory (--SCAT), Severity (--SEV), and Toxicity Grade (--TOXGR) values for the same Subject (USUBJID) and the same Start Date (--STDTC) are expected.
3.1.2
3.1.3
3.2
SUPPAE
1 records with the same values of USUBJID, --STDTC, --TOXGR, --SEV, --SCAT, --CAT, --DECOD, --TERM :)
where $count > 1
return Records {data($recnums)} have the same value of USUBJID, {data($stdtcname)}, {data($toxgrname)}, {data($sevname)}, {data($scatname)}, {data($catname)}, {data($decodname)}, {data($termname)}
]]>
-STDTC date is after RFPENDTC - Start Date/Time (--STDTC) variable value must be less than or equal to Date/Time of End of Participation (RFPENDTC).
3.1.3
3.2
DM
INTERVENTIONS
EVENTS
FINDINGS
SE
SV
xs:dateTime($rfpendtctestvalue)
return {data($stdtcname)}={data($stdtcvalue)} is after DM-RFPENDTC={data($rfpendtcvalue)}
]]>
-DTC date is after RFPENDTC - Date/Time of Collection (--DTC) variable value must be less than or equal to Date/Time of End of Participation (RFPENDTC).
3.1.3
3.2
DM
INTERVENTIONS
EVENTS
FINDINGS
SE
SV
xs:dateTime($rfpendtctestvalue)
return {data($dtcname)}={data($dtcvalue)} is after DM-RFPENDTC={data($rfpendtcvalue)}
]]>
-DTC date is after RFPENDTC single domain - Date/Time of Collection (--DTC) variable value must be less than or equal to Date/Time of End of Participation (RFPENDTC).
3.1.3
3.2
DM
INTERVENTIONS
EVENTS
FINDINGS
SE
SV
xs:dateTime($rfpendtctestvalue)
return {data($dtcname)}={data($dtcvalue)} is after DM-RFPENDTC={data($rfpendtcvalue)}
]]>
-ENDTC date is after RFPENDTC - End Date/Time (--ENDTC) variable value must be less than or equal to Date/Time of End of Participation (RFPENDTC).
3.1.3
3.2
DM
INTERVENTIONS
EVENTS
FINDINGS
SE
SV
xs:dateTime($rfpendtctestvalue)
return {data($endtcname)}={data($endtcvalue)} is after DM-RFPENDTC={data($rfpendtcvalue)}
]]>
EXSTDTC date is before RFXSTDTC - Start Date/Time of Treatment (EXSTDTC) variable value must be greater than or equal to Date/Time of First Study Treatment (RFXSTDTC).
3.1.3
3.2
EX
EXSTDTC={data($exstdtcvalue)} is before DM-RFXSTDTC={data($rfxstdtcvalue)}
]]>
EXSTDTC date is after RFXENDTC - Start Date/Time of Treatment (EXSTDTC) variable value must be less than or equal to Date/Time of Last Study Treatment (RFXENDTC).
3.1.3
3.2
EX
$rfxendtctestvalue
return EXSTDTC={data($exstdtcvalue)} is after DM-RFXENDTC={data($rfxendtcvalue)}
]]>
EXENDTC date is after RFXENDTC - End Date/Time of Treatment (EXENDTC) variable value must be less than or equal to Date/Time of Last Study Treatment (RFXENDTC).
3.1.3
3.2
EX
$rfxendtctestvalue
return EXENDTC={data($exendtcvalue)} is after DM-RFXENDTC={data($rfxendtcvalue)}
]]>
RFXSTDTC date is after RFXENDTC - Date/Time of First Study Treatment (RFXSTDTC) variable value must be less than or equal to Date/Time of Last Study Treatment (RFXENDTC).
3.1.3
3.2
DM
$rfxendtctestvalue
return RFXSTDTC={data($rfxstdtcvalue)} is after RFXENDTC={data($rfxentdtcvalue)}
]]>
Missing value for RFXENDTC, when RFXSTDTC is provided - Value for Date/Time of Last Study Treatment (RFXENDTC) variable must be populated, when Date/Time of First Study Treatment (RFXSTDTC) variable value is provided.
3.1.3
3.2
DM
RFXSTDTC={data($rfxstdtcvalue)} is populated but RFXENDTC is not populated
]]>
Missing value for RFICDTC - Date/Time of Informed Consent (RFICDTC) variable value should be populated. It would be NULL only in studies not collecting this info.
3.1.3
3.2
DM
Missing value for RFICDTC
]]>
-STRESN does not equal -STRESC - Standardized Result in Numeric Format (--STRESN) variable value should be equal Standardized Result in Character Format (--STRESC) variable value, when Standardized Result in Character Format (--STRESC) variable value represents a numeric value.
3.1.2
3.1.3
3.2
FINDINGS
{data($stresnname)}={data($stresnvalue)} does not equal {data($strescname)}={data($strescvalue)} although {data($strescname)} represents a numeric value
]]>
RFSTDTC is not provided for a treated subject - Subject Reference Start Date/Time (RFSTDTC) should be populated for all treated subjects, those where Actual Arm Code (ACTARMCD) is not equal to 'SCRNFAIL', 'NOTASSGN' or 'NOTTRT'.
3.1.3
3.2
DM
RFSTDTC is not provided for a treated subject with USUBJID={data($usubjidvalue)}
]]>
Multiple ADDON records - Trial Summary (TS) domain must contain only one record for 'ADDON' Parameter
3.1.2
3.1.3
3.2
TS
1
return Multiple ADDON records in dataset TS, number of ADDON records found ={data($count)}
]]>
Invalid TSVAL value for AGEMAX - TSVAL value must be either ISO 8601 format for time period (e.g. P80Y) or null, when TSPARMCD='AGEMAX'
3.1.2
3.1.3
3.2
TS
Invalid (non-ISO8601) TSVAL value={data($tsvalvalue)} for AGEMAX in dataset TS
]]>
Multiple AGEMAX records - Trial Summary (TS) domain must contain only one record for 'AGEMAX' Parameter
3.1.2
3.1.3
3.2
TS
1
return Multiple AGEMAX records in TS: number of AGEMAX records found={data($count)}
]]>
Invalid TSVAL value for AGEMIN - TSVAL value must be either ISO 8601 format for time period (e.g. P80Y) or null, when TSPARMCD='AGEMIN'
3.1.2
3.1.3
3.2
TS
Invalid (non-ISO8601) TSVAL value={data($tsvalvalue)} for AGEMIN in dataset TS
]]>
Multiple AGEMIN records - Trial Summary (TS) domain must contain only one record for 'AGEMIN' Parameter
3.1.2
3.1.3
3.2
TS
1
return Multiple AGEMIN records in dataset TS: number of AGEMIN records found={data($count)}
]]>
Invalid TSVAL value for LENGTH - TSVAL value must be either ISO 8601 format for time period (e.g. P80Y) or null, when TSPARMCD='LENGTH'
3.1.2
3.1.3
3.2
TS
Invalid (non-ISO8601) TSVAL value={data($tsvalvalue)} for LENGTH in dataset TS
]]>
Multiple LENGTH records - Trial Summary (TS) domain must contain only one record for 'LENGTH' Parameter
3.1.2
3.1.3
3.2
TS
1
return Multiple LENGTH records in dataset TS: number of LENGTH records found={data($count)}
]]>
Invalid TSVAL value for PLANSUB - TSVAL for PLANSUB record must be numeric
3.1.2
3.1.3
3.2
TS
Invalid TSVAL value for PLANSUB, value={data($tsvalvalue)} in dataset TS
]]>
Multiple PLANSUB records - Trial Summary (TS) domain must contain only one record for 'PLANSUB' Parameter
3.1.2
3.1.3
3.2
TS
1
return Multiple PLANSUB Records in dataset TS: number of PLANSUB records found={data($count)}
]]>
Invalid TSVAL value for RANDOM - TSVAL for RANDOM record must be 'Y' or 'N'.
3.1.2
3.1.3
3.2
TS
Invalid TSVAL value for RANDOM: '{data($tsvalvalue)}' was found
]]>
Multiple RANDOM records - Trial Summary (TS) domain must contain only one record for 'RANDOM' Parameter
3.1.2
3.1.3
3.2
TS
1
return Multiple RANDOM Records in dataset TS: number of RANDOM records found={data($count)}
]]>
Multiple SEXPOP records - Trial Summary (TS) domain must contain only one record for 'SEXPOP' Parameter
3.1.2
3.1.3
3.2
TS
1
return Multiple SEXPOP Records: number of SEXPOP records found={data($count)}
]]>
Missing INDIC Trial Summary Parameter - 'Trial Indication' (INDIC) record must be populated in Trial Summary (TS) domain, when study type is 'INTERVENTIONAL'. It is required for SDTM IG v3.1.2 data and all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing INDIC Trial Summary Parameter in dataset TS: No populated TSPARMCD=INDIC record was found although a record with TSPARMCD=STYPE and TSVAL=INTERVENTIONAL is present
]]>
Multiple NARMS records - Trial Summary (TS) domain must contain only one record for 'NARMS' Parameter
3.1.2
3.1.3
3.2
TS
1
return Multiple NARMS records in dataset {data($tsdatasetname)}, number of NARMS records found={data($count)}
]]>
Variable value must be found in user-defined codelist when value-level condition occurs
Variable value must be populated with terms from user-defined value level codelist as specified in define.xml file
3.1.2
3.1.3
3.2
ALL
{data($valuelistvars)} :)
(: iterate over the variables (OIDs) that do have an attached ValueList :)
for $valuelistvar in $valuelistvars
(: get the Name of the variable :)
let $valuelistvarname := $definedoc//odm:ItemDef[@OID=$valuelistvar]/@Name
(: get the reference valuelist itself :)
let $valuelistoid := (
if($defineversion = '2.1') then $definedoc//odm:ItemDef[@OID=$valuelistvar]/def21:ValueListRef/@ValueListOID
else $definedoc//odm:ItemDef[@OID=$valuelistvar]/def:ValueListRef/@ValueListOID
)
let $valuelist := (
if($defineversion = '2.1') then $definedoc//def21:ValueListDef[@OID=$valuelistoid]
else $definedoc//def:ValueListDef[@OID=$valuelistoid]
)
(: iterate over the ValueList ItemRefs :)
for $valuelistitemref in $valuelist/odm:ItemRef
(: get the OID :)
let $valuelistitemoid := $valuelistitemref/@ItemOID
(: get the WhereClause :)
let $whereclauserefoid := (
if($defineversion = '2.1') then $valuelistitemref/def21:WhereClauseRef/@WhereClauseOID
else $valuelistitemref/def:WhereClauseRef/@WhereClauseOID
)
(: and the corresponding WhereClauseDef :)
let $whereclausedef := (
if($defineversion = '2.1') then $definedoc//def21:WhereClauseDef[@OID=$whereclauserefoid]
else $definedoc//def:WhereClauseDef[@OID=$whereclauserefoid]
)
(: get the item it is about - we currently only support 1 item and only the "EQ" comparator,
and only the case that it is about data in the same dataset (e.g. STRESU depends of TESTCD value)
This covers 90% of the cases :)
let $whereclauseaboutitemoid := (
if($defineversion = '2.1') then $whereclausedef/odm:RangeCheck/@def21:ItemOID
else $whereclausedef/odm:RangeCheck/@def:ItemOID
)
let $checkvalue := $whereclausedef/odm:RangeCheck/odm:CheckValue/text()
(: return {data($whereclauseaboutitemoid)} - {data($checkvalue)} :)
(: pick up the corresponding ItemDef - but only when it does have a connected codelist :)
for $valuelistitemdefcoded in $definedoc//odm:ItemDef[@OID=$valuelistitemoid and odm:CodeListRef/@CodeListOID]
(: get the codelist itself and its coded values :)
let $valuelistcodelistoid := $valuelistitemdefcoded/odm:CodeListRef/@CodeListOID
(: exclude ExternalCodeList :)
let $valuelistcodelist := $definedoc//odm:CodeList[@OID=$valuelistcodelistoid and not(odm:ExternalCodeList)]
let $valuelistcodelistname := $valuelistcodelist/@Name
(: get the coded values :)
let $valuelistcodedvalues := $valuelistcodelist/odm:*/@CodedValue
(: get all the records in the dataset that are about the given valuelist variable :)
(: return {data($valuelistvar)} - {data($whereclauseaboutitemoid)} - {data($checkvalue)} - {data($valuelistcodedvalues)} :)
(: iterate over all the records where the WhereClause applies to,
i.e. $whereclauseaboutitemoid = $checkvalue :)
for $record in $datasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$whereclauseaboutitemoid and @Value=$checkvalue]]
let $recnum := $record/@data:ItemGroupDataSeq
(: get the value of the dependent variable :)
let $dependentvarvalue := $record/odm:ItemData[@ItemOID=$valuelistvar]/@Value
(: the dependent variable value must be a value in the codelist :)
where not(functx:is-value-in-sequence($dependentvarvalue,$valuelistcodedvalues))
return Variable {data($valuelistvarname)} valuelist value '{data($dependentvarvalue)}' is not found in user-defined codelist '{data($valuelistcodelistname)}'. One of [{data($valuelistcodedvalues)}] is expected
]]>
Variable value may not be null when value-level mandatory condition occurs
Variable value must be populated when value level attribute Mandatory='Yes' as specified in define.xml file
3.1.2
3.1.3
3.2
ALL
{data($valuelistvars)} :)
(: iterate over the variables (OIDs) that do have an attached ValueList :)
for $valuelistvar in $valuelistvars
(: get the Name of the variable :)
let $valuelistvarname := $definedoc//odm:ItemDef[@OID=$valuelistvar]/@Name
(: get the reference valuelist itself :)
let $valuelistoid := (
if($defineversion = '2.1') then $definedoc//odm:ItemDef[@OID=$valuelistvar]/def21:ValueListRef/@ValueListOID
else $definedoc//odm:ItemDef[@OID=$valuelistvar]/def:ValueListRef/@ValueListOID
)
let $valuelist := (
if($defineversion = '2.1') then $definedoc//def21:ValueListDef[@OID=$valuelistoid]
else $definedoc//def:ValueListDef[@OID=$valuelistoid]
)
(: iterate over the ValueList ItemRefs that are "Mandatory" :)
for $valuelistitemref in $valuelist/odm:ItemRef[@Mandatory='Yes']
(: get the OID :)
let $valuelistitemoid := $valuelistitemref/@ItemOID
(: get the WhereClause :)
let $whereclauserefoid := (
if($defineversion = '2.1') then $valuelistitemref/def21:WhereClauseRef/@WhereClauseOID
else $valuelistitemref/def:WhereClauseRef/@WhereClauseOID
)
(: and the corresponding WhereClauseDef :)
let $whereclausedef := (
if($defineversion = '2.1') then $definedoc//def21:WhereClauseDef[@OID=$whereclauserefoid]
else $definedoc//def:WhereClauseDef[@OID=$whereclauserefoid]
)
(: get the item it is about - we currently only support 1 item and only the "EQ" comparator,
and only the case that it is about data in the same dataset (e.g. STRESU depends of TESTCD value)
This covers 90% of the cases :)
let $whereclauseaboutitemoid := (
if($defineversion = '2.1') then $whereclausedef/odm:RangeCheck/@def21:ItemOID
else $whereclausedef/odm:RangeCheck/@def:ItemOID
)
let $whereclauseaboutitemname := $definedoc//odm:ItemDef[@OID=$whereclauseaboutitemoid]/@Name
let $checkvalue := $whereclausedef/odm:RangeCheck/odm:CheckValue/text()
(: return {data($whereclauseaboutitemoid)} - {data($checkvalue)} :)
(: pick up the corresponding ItemDef :)
for $valuelistitemdefmandatory in $definedoc//odm:ItemDef[@OID=$valuelistitemoid]
(: get all the records in the dataset that are about the given valuelist variable :)
(: return {data($valuelistvar)} - {data($whereclauseaboutitemoid)} - {data($checkvalue)} - {data($valuelistcodedvalues)} :)
(: iterate over all the records where the WhereClause applies to,
i.e. $whereclauseaboutitemoid = $checkvalue :)
for $record in $datasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$whereclauseaboutitemoid and @Value=$checkvalue]]
let $recnum := $record/@data:ItemGroupDataSeq
(: get the value of the dependent variable :)
let $dependentvarvalue := $record/odm:ItemData[@ItemOID=$valuelistvar]/@Value
(: the dependent variable value may not be null as "Mandatory='Yes'" :)
where not($dependentvarvalue)
return Variable {data($valuelistvarname)} valuelist value '{data($dependentvarvalue)}' is found to be null although the item is valuelist-mandatory for {data($whereclauseaboutitemname)}='{data($checkvalue)}'
]]>
Value level datatype must match the datatype described in define.xml - Variable datatype is not %Variable.@Clause.DataType% when value-level condition occurs
3.1.2
3.1.3
3.2
ALL
{data($valuelistvars)} :)
(: iterate over the variables (OIDs) that do have an attached ValueList :)
for $valuelistvar in $valuelistvars
(: get the Name of the variable :)
let $valuelistvarname := $definedoc//odm:ItemDef[@OID=$valuelistvar]/@Name
(: get the reference valuelist itself :)
let $valuelistoid := (
if($defineversion = '2.1') then $definedoc//odm:ItemDef[@OID=$valuelistvar]/def21:ValueListRef/@ValueListOID
else $definedoc//odm:ItemDef[@OID=$valuelistvar]/def:ValueListRef/@ValueListOID
)
let $valuelist := (
if($defineversion = '2.1') then $definedoc//def21:ValueListDef[@OID=$valuelistoid]
else $definedoc//def:ValueListDef[@OID=$valuelistoid]
)
(: iterate over the ValueList ItemRefs :)
for $valuelistitemref in $valuelist/odm:ItemRef[@Mandatory='Yes']
(: get the OID :)
let $valuelistitemoid := $valuelistitemref/@ItemOID
(: get the WhereClause :)
let $whereclauserefoid := (
if($defineversion = '2.1') then $valuelistitemref/def21:WhereClauseRef/@WhereClauseOID
else $valuelistitemref/def:WhereClauseRef/@WhereClauseOID
)
(: and the corresponding WhereClauseDef :)
let $whereclausedef := (
if($defineversion = '2.1') then $definedoc//def21:WhereClauseDef[@OID=$whereclauserefoid]
else $definedoc//def:WhereClauseDef[@OID=$whereclauserefoid]
)
(: get the item it is about - we currently only support 1 item and only the "EQ" comparator,
and only the case that it is about data in the same dataset (e.g. STRESU depends of TESTCD value)
This covers 90% of the cases :)
let $whereclauseaboutitemoid := (
if($defineversion = '2.1') then $whereclausedef/odm:RangeCheck/@def21:ItemOID
else $whereclausedef/odm:RangeCheck/@def:ItemOID
)
let $whereclauseaboutitemname := $definedoc//odm:ItemDef[@OID=$whereclauseaboutitemoid]/@Name
let $checkvalue := $whereclausedef/odm:RangeCheck/odm:CheckValue/text()
(: return {data($whereclauseaboutitemoid)} - {data($checkvalue)} :)
(: pick up the corresponding ItemDef :)
for $valuelistitemdef in $definedoc//odm:ItemDef[@OID=$valuelistitemoid]
(: get the datatype :)
let $datatype := $valuelistitemdef/@DataType
(: get all the records in the dataset that are about the given valuelist variable :)
(: return {data($valuelistvar)} - {data($whereclauseaboutitemoid)} - {data($checkvalue)} - {data($valuelistcodedvalues)} :)
(: iterate over all the records where the WhereClause applies to,
i.e. $whereclauseaboutitemoid = $checkvalue :)
for $record in $datasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$whereclauseaboutitemoid and @Value=$checkvalue]]
let $recnum := $record/@data:ItemGroupDataSeq
(: get the value of the dependent variable :)
let $itemvalue := $record/odm:ItemData[@ItemOID=$valuelistvar]/@Value
(: the value must be according to the datatype :)
(: define.xml allows following datatypes:
text, integer, float, datetime, date, time, partialDate, partialTime, partialDatetime,
incompleteDatetime, durationDatetime
:)
(: P.S. in case 'datetime' is expected but a correct date is provided, that is also ok :)
let $isValidDataTypeValue :=
if ($datatype = 'text') then 'true' (: everything is text ... :)
else if($datatype = 'integer' and $itemvalue castable as xs:integer) then 'true'
else if($datatype = 'float' and $itemvalue castable as xs:double) then 'true'
else if($datatype = 'datetime' and $itemvalue castable as xs:dateTime) then 'true'
else if($datatype = 'date' and $itemvalue castable as xs:date or $itemvalue castable as xs:date) then 'true'
else if($datatype = 'time' and $itemvalue castable as xs:time) then 'true'
(: use function for partialDate :)
else if($datatype = 'partialDate' and functx:isPartialDate($itemvalue)) then 'true'
(: use function for partialTime :)
else if($datatype = 'partialTime' and functx:isPartialTime($itemvalue)) then 'true'
(: use function for partialDateTime :)
else if($datatype = 'partialDateTime' and functx:isPartialDatetime($itemvalue)) then 'true'
(: TODO: write function for incompleteDatetime :)
else if($datatype = 'durationDatetime' and $itemvalue castable as xs:duration) then 'true'
(: TODO: write function for other form of durationDatetime ("from-to" format) :)
else 'false'
(: when the value does not match the datatype, give an error :)
where $isValidDataTypeValue = 'false'
return Variable {data($valuelistvarname)} valuelist value '{data($itemvalue)}' is compatible with its data type '{data($datatype)}'
]]>
Value level length must not exceed the length as specified define.xml
Variable value is longer than defined max length %Variable.@Clause.Length% when value-level condition occurs
3.1.2
3.1.3
3.2
ALL
{data($valuelistvars)} :)
(: iterate over the variables (OIDs) that do have an attached ValueList :)
for $valuelistvar in $valuelistvars
(: get the Name of the variable :)
let $valuelistvarname := $definedoc//odm:ItemDef[@OID=$valuelistvar]/@Name
(: get the reference valuelist itself :)
let $valuelistoid := (
if($defineversion = '2.1') then $definedoc//odm:ItemDef[@OID=$valuelistvar]/def21:ValueListRef/@ValueListOID
else $definedoc//odm:ItemDef[@OID=$valuelistvar]/def:ValueListRef/@ValueListOID
)
let $valuelist := (
if($defineversion = '2.1') then $definedoc//def21:ValueListDef[@OID=$valuelistoid]
else $definedoc//def:ValueListDef[@OID=$valuelistoid]
)
(: iterate over the ValueList ItemRefs :)
for $valuelistitemref in $valuelist/odm:ItemRef[@Mandatory='Yes']
(: get the OID :)
let $valuelistitemoid := $valuelistitemref/@ItemOID
(: get the WhereClause :)
let $whereclauserefoid := (
if($defineversion = '2.1') then $valuelistitemref/def21:WhereClauseRef/@WhereClauseOID
else $valuelistitemref/def:WhereClauseRef/@WhereClauseOID
)
(: and the corresponding WhereClauseDef :)
let $whereclausedef := (
if($defineversion = '2.1') then $definedoc//def21:WhereClauseDef[@OID=$whereclauserefoid]
else $definedoc//def:WhereClauseDef[@OID=$whereclauserefoid]
)
(: get the item it is about - we currently only support 1 item and only the "EQ" comparator,
and only the case that it is about data in the same dataset (e.g. STRESU depends of TESTCD value)
This covers 90% of the cases :)
let $whereclauseaboutitemoid := (
if($defineversion = '2.1') then $whereclausedef/odm:RangeCheck/@def21:ItemOID
else $whereclausedef/odm:RangeCheck/@def:ItemOID
)
let $whereclauseaboutitemname := $definedoc//odm:ItemDef[@OID=$whereclauseaboutitemoid]/@Name
let $checkvalue := $whereclausedef/odm:RangeCheck/odm:CheckValue/text()
(: return {data($whereclauseaboutitemoid)} - {data($checkvalue)} :)
(: pick up the corresponding ItemDef :)
for $valuelistitemdef in $definedoc//odm:ItemDef[@OID=$valuelistitemoid]
(: get the maximal length :)
let $maxlength := $valuelistitemdef/@Length
(: get all the records in the dataset that are about the given valuelist variable :)
(: return {data($valuelistvar)} - {data($whereclauseaboutitemoid)} - {data($checkvalue)} - {data($valuelistcodedvalues)} :)
(: iterate over all the records where the WhereClause applies to,
i.e. $whereclauseaboutitemoid = $checkvalue :)
for $record in $datasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$whereclauseaboutitemoid and @Value=$checkvalue]]
let $recnum := $record/@data:ItemGroupDataSeq
(: get the value of the dependent variable :)
let $itemvalue := $record/odm:ItemData[@ItemOID=$valuelistvar]/@Value
(: and get its length :)
let $valuelength := string-length($itemvalue)
(: real length should be less or equal than the maximum lenth :)
where $valuelength > $maxlength
return Variable {data($valuelistvarname)} valuelist value '{data($itemvalue)}' is longer than the allowed maximal length {data($maxlength)}
]]>
All Medical Devices (SPDEVID) must be present in Device Identifier (DI) domain
3.2
ALL
Device with SPDEVID '{$spdevvalue}' cannot be found in the DI dataset
]]>
Device Type (TYPE) Parameter must be populated for each Medical Device in Device Identifiers (DI) domain
3.2
DI
No record with DIPARMCD='TYPE' could be found for SPDEVID='{$dispdevid}' in DI dataset
]]>
At least one of SPDEVID or USUBJID must be populated
3.2
DU
Neither USUBJID nor SPDEVID is populated
]]>
Value of --SEQ must be unique for records with the same values for USUBJID and SPDEVID in DE, DO, DT, DU
The value of Sequence Number (--SEQ) variable must be unique for each record within a domain and within each combination of Sponsor Device Identifier (SPDEVID) and Unique Subject Identifier (USUBJID) variables' values
3.2
DU
DE
DO
DT
$recnum1]
let $recnum2 := $record2/@data:ItemGroupDataSeq
let $seqvalue2 := $record2/odm:ItemData[@ItemOID=$seqoid]/@Value
(: the two -SEQ values must be different :)
where $seqvalue1=$seqvalue2
return Records {data($recnum1)} and {data($recnum2)} have the same value '{data($seqvalue1)}' for {data($seqname)} with identical values for USUBJID = '{data($usubjid)}' and SPDEVID = ''
]]>
There may only be one record per device property defined by SPDEVID and DOTESTCD variables
3.2
DO
1
return Records {data($recnums)}have the same value for SPDEVID '{data($spdevid)}' and DOTESTCD '{data($dotestcd)}'
]]>
--RFTDTC may not be populated when --TPTREF is not populated
--RFTDTC may not be populated when --TPTREF is not populated
3.1.2
3.1.3
3.2
ALL
{data($rftdtcdname)} is populated but {$tptrefname} is not populated
]]>
--RFTDTC may not be populated when --TPTREF is not populated
--RFTDTC may not be populated when --TPTREF is not populated
3.1.2
3.1.3
3.2
ALL
{data($rftdtcdname)} is populated but {$tptrefname} is not populated
]]>
All subjects must have an Informed Consent record in the Disposition domain
All subjects must have an Informed Consent record is DS
3.1.2
3.1.3
3.2
DS
DM
CG0143
No informed consent record (DSTERM='INFORMED CONSENT OBTAINED') in DS could be found for subject {data($dmusubjid)}
]]>
--BODSYS must be populated when --BDSYCD is populated
Body System or Organ Class (--BODSYS) must be populated when Body System or Organ Class Code (--BDSYCD) is populated
3.1.2
3.1.3
3.2
AE
MH
CE
CG0082
Null value found for {data($bodsysname)} where {data($bdsycdname)}='{data($bdsycd)}'
]]>
--BODSYS must be populated when --BDSYCD is populated
Body System or Organ Class (--BODSYS) must be populated when Body System or Organ Class Code (--BDSYCD) is populated
3.1.2
3.1.3
3.2
AE
MH
CE
CG0082
Null value found for {data($bodsysname)} where {data($bdsycdname)}='{data($bdsycd)}'
]]>
Value for --BODSYS must be consistent within --BDSYCD
All values of Body System or Organ Class (--BODSYS) should be the same for a given value of Body System or Organ Class Code (--BDSYCD)
3.1.2
3.1.3
3.2
AE
MH
CE
CG0083
{data($bodsys)} - {data($bodsys)} :)
(: iterate over all other records in the same group, they have the same value for --BDSYCD,
and must also have the same value for --BODSYS :)
for $record in $group/odm:ItemGroupData[position()>1]
let $recnum2 := $record/@data:ItemGroupDataSeq
(: get the value of --BODSYS :)
let $bodsys2 := $record/odm:ItemData[@ItemOID=$bodsysoid]/@Value
(: the two --BODSYS values must be equal, except when they are null :)
where $bdsycd!='' and $bodsys1!='' and $bodsys2!='' and not($bodsys1 = $bodsys2)
return Combination of {data($bdsycdname)} and {data($bodsysname)} in dataset {data($datasetname)} is inconsistent:
record {data($recnum1)}: {data($bdsycdname)}='{data($bdsycd)}' - {data($bodsysname)}='{data($bodsys1)}',
record {data($recnum2)}: {data($bdsycdname)}='{data($bdsycd)}' - {data($bodsysname)}='{data($bodsys2)}', ,
]]>
Value for --BDSYCD must be consistent within --BODSYS -
All values of Body System or Organ Class Code (--BDSYCD) should be the same for a given value of Body System or Organ Class (--BODSYS)
3.1.2
3.1.3
3.2
AE
MH
CE
CG0083
{data($bodsys)} - {data($bdsycd)} :)
(: iterate over all other records in the same group, they have the same value for --BODSYS,
and must also have the same value for --BDSYCD :)
for $record in $group/odm:ItemGroupData[position()>1]
let $recnum2 := $record/@data:ItemGroupDataSeq
(: get the value of --BDSYCD :)
let $bdsycd2 := $record/odm:ItemData[@ItemOID=$bdsycdoid]/@Value
(: the two --BDSYCD values must be equal, except when they are null :)
where $bodsys!='' and $bdsycd1 != '' and $bdsycd2 != '' and not($bdsycd1 = $bdsycd2)
return Combination of {data($bdsycdname)} and {data($bodsysname)} in dataset {data($datasetname)} is inconsistent:
record {data($recnum1)}: {data($bdsycdname)}='{data($bdsycd1)}' - {data($bodsysname)}='{data($bodsys)}',
record {data($recnum2)}: {data($bdsycdname)}='{data($bdsycd2)}' - {data($bodsysname)}='{data($bodsys)}', ,
]]>
Value for --BDSYCD must be consistent within --BODSYS -
All values of Body System or Organ Class Code (--BDSYCD) should be the same for a given value of Body System or Organ Class (--BODSYS)
3.1.2
3.1.3
3.2
AE
MH
CE
CG0083
{data($bodsys)} - {data($bdsycd)} :)
(: iterate over all other records in the same group, they have the same value for --BODSYS,
and must also have the same value for --BDSYCD :)
for $record in $group/odm:ItemGroupData[position()>1]
let $recnum2 := $record/@data:ItemGroupDataSeq
(: get the value of --BDSYCD :)
let $bdsycd2 := $record/odm:ItemData[@ItemOID=$bdsycdoid]/@Value
(: the two --BDSYCD values must be equal, except when they are null :)
where $bodsys!='' and $bdsycd1 != '' and $bdsycd2 != '' and not($bdsycd1 = $bdsycd2)
return Combination of {data($bdsycdname)} and {data($bodsysname)} in dataset {data($datasetname)} is inconsistent:
record {data($recnum1)}: {data($bdsycdname)}='{data($bdsycd1)}' - {data($bodsysname)}='{data($bodsys)}',
record {data($recnum2)}: {data($bdsycdname)}='{data($bdsycd2)}' - {data($bodsysname)}='{data($bodsys)}', ,
]]>
--TPT variable must be present, when --TPTNUM variable is present
Planned Time Point Name (--TPT) variable must be included into the domain, when Planned Time Point Number (--TPTNUM) variable is present
3.1.2
3.1.3
3.2
ALL
CG0091
Variable {data($tptnumname)} is present in dataset {data($name)} but {data($tptname)} is not present in the dataset
]]>
--TPTREF must be present in the dataset when --RFTDTC present
Time Point Reference (--TPTREF) variable must be included into the domain, when Date/Time of Reference Point (--RFTDTC) variable is present
3.1.2
3.1.3
3.2
ALL
CG0090
Variable {data($rftdtcname)} is present in dataset {data($name)} but {data($tptrefname)} is not present in the dataset
]]>
--TPTREF variable must be present in dataset, when --ELTM variable is present
Time Point Reference (--TPTREF) variable must be included into the domain, when Planned Elapsed Time from Time Point Ref (--ELTM) variable is present
3.1.2
3.1.3
3.2
ALL
CG0092
Variable {data($eltmname)} is present in dataset {data($name)} but {data($tptrefname)} is not present in the dataset
]]>
ECDOSE must be greater than 0 when ECOCCUR does not equal 'N' and ECDOSTXT is null
ECDOSE must not be set to zero (0) as an alternative method for indicating doses not taken, not given, or missed
3.2
EC
CG0100
0 :)
xquery version "3.0";
declare namespace def = "http://www.cdisc.org/ns/def/v2.0";
declare namespace def21 = "http://www.cdisc.org/ns/def/v2.1";
declare namespace odm="http://www.cdisc.org/ns/odm/v1.3";
declare namespace data="http://www.cdisc.org/ns/Dataset-XML/v1.0";
declare namespace xlink="http://www.w3.org/1999/xlink";
(: "declare variable ... external" allows to pass $base and $define from an external programm :)
declare variable $base external;
declare variable $define external;
declare variable $defineversion external;
(: let $base := '/db/fda_submissions/cdisc01/' :)
(: let $define := 'define2-0-0-example-sdtm.xml' :)
let $definedoc := doc(concat($base,$define))
(: get the EC dataset(s) definition :)
for $itemgroupdef in $definedoc//odm:ItemGroupDef[@Domain='EC' or starts-with(@Name,'EC')]
let $name := $itemgroupdef/@Name
(: get the dataset itself :)
let $datasetlocation := (
if($defineversion = '2.1') then $itemgroupdef/def21:leaf/@xlink:href
else $itemgroupdef/def:leaf/@xlink:href
)
let $datasetdoc := (
if($datasetlocation) then doc(concat($base,$datasetlocation))
else ()
)
(: get the OID of ECOCCUR, ECDOSTXT and ECDOSE :)
let $ecoccuroid := (
for $a in $definedoc//odm:ItemDef[@Name='ECOCCUR']/@OID
where $a = $itemgroupdef/odm:ItemRef/@ItemOID
return $a
)
let $ecdostxtoid := (
for $a in $definedoc//odm:ItemDef[@Name='ECDOSTXT']/@OID
where $a = $itemgroupdef/odm:ItemRef/@ItemOID
return $a
)
(: :)
let $ecdoseoid := (
for $a in $definedoc//odm:ItemDef[@Name='ECDOSE']/@OID
where $a = $itemgroupdef/odm:ItemRef/@ItemOID
return $a
)
(: get all the records in the dataset for which ECOCCUR != 'N' and ECDOSTXT is null :)
for $record in $datasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$ecoccuroid and @Value!='N'] and not(odm:ItemData[@ItemOID=$ecdostxtoid])]
let $recnum := $record/@data:ItemGroupDataSeq
(: get the value of ECDOSE (as text) :)
let $dose := $record/odm:ItemData[@ItemOID=$ecdoseoid]/@Value
(: ECDOSE > 0 :)
where $dose castable as xs:double and xs:double($dose)<0
return
ECDOSE is not a number or is a non-positive number where ECOCCUR != 'N' and ECDOSTXT is null. The value found for ECDOSE is '{data($dose)}'
]]>
When ECOCCUR = 'N' then ECDOSE = null
ECDOSE must either be null when ECOCCUR equals 'N', or ECDOSE must be greater than 0. ECDOSE would be greater than 0 (when ECOCCUR equals N) for records that represent specific dose amounts that are not taken, not given, or missed
3.2
CG0101
EC
ECDOSE={data($dose)} is expected to be null as ECOCCUR='N'
]]>
When EXTRT = 'PLACEBO' then EXDOSE = 0
Doses of placebo should be represented by EXTRT = 'PLACEBO' and EXDOSE = 0 (indicating 0 mg of active ingredient was taken or administered)
3.1.2
3.1.3
3.2
EX
CG0102
{data($extrtoid)} :)
(: get all the records in the dataset for which EXTRT='PLACEBO' :)
for $record in $datasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$extrtoid and @Value='PLACEBO']]
let $recnum := $record/@data:ItemGroupDataSeq
(: get the value of EXDOSE (as text) :)
let $exdose := $record/odm:ItemData[@ItemOID=$exdoseoid]/@Value
(: When EXTRT = 'PLACEBO' then EXDOSE = 0 :)
where $exdose castable as xs:double and xs:double($exdose)!= 0
return
EXDOSE={data($exdose)} is expected to be 0 as EXTRT='PLACEBO'
]]>
--TPTNUM variable must be present, when --TPT variable is present
Planned Time Point Number (--TPTNUM) variable must be included into the domain, when Planned Time Point Name (--TPT) variable is present
3.1.2
3.1.3
3.2
ALL
CG0468
Variable {data($tptname)} is present in dataset {data($name)} but {data($tptnumname)} is not present in the dataset
]]>
When EXTRTV = null then EXVAMTU = null
When EXTRTV = null then EXVAMTU must be null
3.1.2
3.1.3
3.2
INTERVENTIONS
CG0108
EXVAMTU={data($exvamtu)} but was expected to be null as EXTRTV is null
]]>
When EXTRTV = null then EXVAMTU = null
When EXTRTV = null then EXVAMTU must be null
3.1.2
3.1.3
3.2
INTERVENTIONS
CG0108
EXVAMTU={data($exvamtu)} but was expected to be null as EXTRTV is null
]]>
DTHFL must be 'Y' when SS.SSSTRESC = 'DEAD'
DTHFL must equal 'Y' when there is a record in the Subject Status (SS) domain with SSSTRESC = 'DEAD'
3.2
SS
DM
CG0132
A record (record number={data($recnumss)}) for USUBJID='{data($ssusubjid)}' has been found for which SSSTRESC='DEAD' but the value of DTHFL='{data($dthfl)}' in DM is not 'Y'
]]>
DTHFL must be 'Y' when there is a SS.STRESC='DEAD' for the subject
DTHFL must equal 'Y' when there is a record in the Subject Status (SS) domain with SSSTRESC = 'DEAD'
3.2
DD
CG0133
A record for USUBJID='{data($subject)}' has been found in the DD dataset but the value of DTHFL='{data($dthfl)}' in DM is not 'Y'
]]>
DTHFL must be 'Y' when there is a record in AE with AEOUT = 'FATAL'
DTHFL must equal 'Y' when there is a record in the Adverse Events (AE) domain with AEOUT = 'FATAL'
3.1.3
3.2
AE
DM
CG0134
A record for USUBJID='{data($usubjid)}' (record number {data($recnum)}) has been found in the AE dataset with AEOUT='FATAL' but the value of DTHFL='{data($dthfl)}' in DM is not 'Y'
]]>
DTHFL must be 'Y' when there is a record AE with AESDTH = 'Y'
DTHFL must equal 'Y' when there is a record in the Adverse Events (AE) domain with AESDTH = 'Y'
3.1.3
3.2
AE
DM
CG0135
A record for USUBJID='{data($usubjid)}' (record number {data($recnum)}) has been found in the AE dataset with AESDTH='Y' but the value of DTHFL='{data($dthfl)}' in DM is not 'Y'
]]>
DTHFL must be 'Y' when there is a record in DS with DSDECOD = 'DEATH'
DTHFL must equal 'Y' when there is a record in the Disposition (DS) domain with DSDECOD = 'DEATH'
3.1.3
3.2
DS
DM
CG0136
A record for USUBJID='{data($usubjid)}' (record number {data($recnum)}) has been found in the DS dataset with DSDECOD='DEATH' but the value of DTHFL='{data($dthfl)}' in DM is not 'Y'
]]>
DTHFL must be 'Y' when there is a record in DS with DSDECOD = 'DEATH'
DTHFL must equal 'Y' when there is a record in the Disposition (DS) domain with DSDECOD = 'DEATH'
3.1.3
3.2
DS
DM
CG0136
A record for USUBJID='{data($usubjid)}' (record number {data($recnum)}) has been found in the DS dataset with DSDECOD='DEATH' but the value of DTHFL='{data($dthfl)}' in DM is not 'Y'
]]>
When ACTARM in ('Screen Failure' 'Not Assigned' 'Not Treated') then RFSTDTC must be null
RFSTDTC must be null when actual arm indicates that the subject is a screen failure ('Screen Failure'), was not assigned to an arm ('Not Assigned'), or was not treated ('NOTTRT'). This rule applies to studies where RFSTDTC is associated with a treatment date
3.1.3
3.2
DM
CG0145
RFSTDTC='{data($rfstdtcvalue)}' expected to be null for ACTARM='{data($actarmvalue)}'
]]>
The value of Set Code (SETCD) may not be more than 8 characters in length
The value of Set Code (SETCD) should be no more than 8 characters in length
3.1.2
3.1.3
3.2
DM
CG0149
8
return SETCD='{data($setcdvalue)}' has more than 8 characters
]]>
SSDTC must be greater than or equal to DTHDTC when SSSTRESC is 'DEAD'
Subject Status Date/Time of Assessment (SSDTC) must be greater than or equal to Date/Time of Death (DTHDTC) when the subject's status is 'DEAD'
SS
3.2
CG0171
= DM.DTHDTC :)
xquery version "3.0";
declare namespace def = "http://www.cdisc.org/ns/def/v2.0";
declare namespace def21 = "http://www.cdisc.org/ns/def/v2.1";
declare namespace odm="http://www.cdisc.org/ns/odm/v1.3";
declare namespace data="http://www.cdisc.org/ns/Dataset-XML/v1.0";
declare namespace xlink="http://www.w3.org/1999/xlink";
(: "declare variable ... external" allows to pass $base and $define from an external programm :)
declare variable $base external;
declare variable $define external;
declare variable $defineversion external;
(: let $base := '/db/fda_submissions/cdisc01/' :)
(: let $define := 'define2-0-0-example-sdtm.xml' :)
let $definedoc := doc(concat($base,$define))
(: Get the DM dataset :)
let $dmitemgroupdef := $definedoc//odm:ItemGroupDef[@Name='DM']
(: and the location of the DM dataset :)
let $dmdatasetlocation := (
if($defineversion = '2.1') then $dmitemgroupdef/def21:leaf/@xlink:href
else $dmitemgroupdef/def:leaf/@xlink:href
)
let $dmdatasetdoc := doc(concat($base,$dmdatasetlocation))
(: Get the SS (Subject Status) dataset and its location :)
let $ssitemgroupdef := $definedoc//odm:ItemGroupDef[@Name='SS']
let $ssdatasetlocation := (
if($defineversion = '2.1') then $ssitemgroupdef/def21:leaf/@xlink:href
else $ssitemgroupdef/def:leaf/@xlink:href
)
let $ssdatasetdoc := (
if($ssdatasetlocation) then doc(concat($base,$ssdatasetlocation))
else ()
)
(: we need the OID of DTHDTC and of USUBJID in DM :)
let $dmdthdtcoid := (
for $a in $definedoc//odm:ItemDef[@Name='DTHDTC']/@OID
where $a = $dmitemgroupdef/odm:ItemRef/@ItemOID
return $a
)
let $dmusubjidoid := (
for $a in $definedoc//odm:ItemDef[@Name='USUBJID']/@OID
where $a = $dmitemgroupdef/odm:ItemRef/@ItemOID
return $a
)
(: we need the OID of SSSTRESC, SSDTC and of USUBJID in SS :)
let $ssusubjidoid := (
for $a in $definedoc//odm:ItemDef[@Name='USUBJID']/@OID
where $a = $ssitemgroupdef/odm:ItemRef/@ItemOID
return $a
)
let $ssstresc := (
for $a in $definedoc//odm:ItemDef[@Name='SSSTRESC']/@OID
where $a = $ssitemgroupdef/odm:ItemRef/@ItemOID
return $a
)
let $ssdtcoid := (
for $a in $definedoc//odm:ItemDef[@Name='SSDTC']/@OID
where $a = $ssitemgroupdef/odm:ItemRef/@ItemOID
return $a
)
(: iterate over all records in SS for which SSSTRESC='DEAD' :)
for $record in $ssdatasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$ssstresc and @Value='DEAD']]
let $recnumss := $record/@data:ItemGroupDataSeq
(: get the value of USUBJID for this record :)
let $ssusubjid := $record/odm:ItemData[@ItemOID=$ssusubjidoid]/@Value
(: get the value of SSDTC for this record :)
let $ssdtc := $record/odm:ItemData[@ItemOID=$ssdtcoid]/@Value
(: get the DM record for this subject :)
let $dmrecord := $dmdatasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$dmusubjidoid and @Value=$ssusubjid]]
let $dmrecnum := $dmrecord/@data:ItemGroupDataSeq
(: get the value of DTHDTC :)
let $dthdtc := $dmrecord/odm:ItemData[@ItemOID=$dmdthdtcoid]/@Value
(: SSDTC >= DM.DTHDTC :)
where $ssdtc castable as xs:date and $dthdtc castable as xs:date and not(xs:date($ssdtc) >= xs:date($dthdtc))
return SSDTC={data($ssdtc)} is not before or equal to DM.DTHDTC={data($dthdtc)} for SSSTRESC='DEAD'
]]>
SSDTC must be greater than or equal to DSSTDTC when SSSTRESC = 'DEAD'
Subject Status Date/Time of Assessment (SSDTC) must be greater than or equal to Start Date/Time of Disposition Event (DSSTDTC) when the subject's status is 'DEAD'
3.2
SS
CG0172
= DS.DSSTDTC :)
xquery version "3.0";
declare namespace def = "http://www.cdisc.org/ns/def/v2.0";
declare namespace def21 = "http://www.cdisc.org/ns/def/v2.1";
declare namespace odm="http://www.cdisc.org/ns/odm/v1.3";
declare namespace data="http://www.cdisc.org/ns/Dataset-XML/v1.0";
declare namespace xlink="http://www.w3.org/1999/xlink";
declare namespace functx = "http://www.functx.com";
(: sorting function - also sorts dates :)
declare function functx:sort
( $seq as item()* ) as item()* {
for $item in $seq
order by $item
return $item
} ;
(: "declare variable ... external" allows to pass $base and $define from an external programm :)
declare variable $base external;
declare variable $define external;
declare variable $defineversion external;
(: let $base := '/db/fda_submissions/cdisc01/' :)
(: let $define := 'define2-0-0-example-sdtm.xml' :)
let $definedoc := doc(concat($base,$define))
(: Get the DS dataset :)
let $dsitemgroupdef := $definedoc//odm:ItemGroupDef[@Name='DS']
(: and the location of the DS dataset :)
let $dsdatasetlocation := (
if($defineversion = '2.1') then $dsitemgroupdef/def21:leaf/@xlink:href
else $dsitemgroupdef/def:leaf/@xlink:href
)
let $dsdatasetdoc := doc(concat($base,$dsdatasetlocation))
(: Get the SS (Subject Status) dataset and its location :)
let $ssitemgroupdef := $definedoc//odm:ItemGroupDef[@Name='SS']
let $ssdatasetlocation := (
if($defineversion = '2.1') then $ssitemgroupdef/def21:leaf/@xlink:href
else $ssitemgroupdef/def:leaf/@xlink:href
)
let $ssdatasetdoc := (
if($ssdatasetlocation) then doc(concat($base,$ssdatasetlocation))
else ()
)
(: we need the OID of DSSTDTC and of USUBJID in DS :)
let $dsstdtcoid := (
for $a in $definedoc//odm:ItemDef[@Name='DSSTDTC']/@OID
where $a = $dsitemgroupdef/odm:ItemRef/@ItemOID
return $a
)
let $dsusubjidoid := (
for $a in $definedoc//odm:ItemDef[@Name='USUBJID']/@OID
where $a = $dsitemgroupdef/odm:ItemRef/@ItemOID
return $a
)
(: we need the OID of SSSTRESC, SSDTC and of USUBJID in SS :)
let $ssusubjidoid := (
for $a in $definedoc//odm:ItemDef[@Name='USUBJID']/@OID
where $a = $ssitemgroupdef/odm:ItemRef/@ItemOID
return $a
)
let $ssstresc := (
for $a in $definedoc//odm:ItemDef[@Name='SSSTRESC']/@OID
where $a = $ssitemgroupdef/odm:ItemRef/@ItemOID
return $a
)
let $ssdtcoid := (
for $a in $definedoc//odm:ItemDef[@Name='SSDTC']/@OID
where $a = $ssitemgroupdef/odm:ItemRef/@ItemOID
return $a
)
(: iterate over all records in SS for which SSSTRESC='DEAD' :)
for $record in $ssdatasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$ssstresc and @Value='DEAD']]
let $recnumss := $record/@data:ItemGroupDataSeq
(: get the value of USUBJID for this record :)
let $ssusubjid := $record/odm:ItemData[@ItemOID=$ssusubjidoid]/@Value
(: get the value of SSDTC for this record :)
let $ssdtc := $record/odm:ItemData[@ItemOID=$ssdtcoid]/@Value
(: get all the DSSTDTC values for this subject :)
let $dsstdtcvalues := $dsdatasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$dsusubjidoid and @Value=$ssusubjid]]/odm:ItemData[@ItemOID=$dsstdtcoid]/@Value
(: sort the DSSTDTC values and take the latest one :)
let $latestdsstdtc := functx:sort($dsstdtcvalues)[last()]
(: SSDTC >= DS.DSSTDTC :)
where $ssdtc castable as xs:date and $latestdsstdtc castable as xs:date and not(xs:date($ssdtc) >= xs:date($latestdsstdtc))
return SSDTC={data($ssdtc)} is not before or equal to latest DSSTDTC={data($ssdtc)} for SSSTRESC='DEAD'
]]>
When MBTESTCD = 'ORGANISM' then MBRESCAT may not be null
MBRESCAT is expected to be populated in all records where a microorganism has been identified (MBTESTCD = 'ORGANISM'), excluding records where MBSTRESC equals 'NO GROWTH' or MBMETHOD equals 'GRAM STAIN'.
3.1.2
3.1.3
3.2
MB
CG0193
MBTESTCD='ORGANISM' but MBRESCAT=null
]]>
When IDVARVAL = null and USUBJID = null then the value of IDVAR may not be '--SEQ'
When the RELREC dataset is used to identify relationships between datasets (in which case USUBJID and IDVARVAL are left null), instead of relating individual records, --SEQ cannot be used for IDVAR because --SEQ only has meaning within a subject within a dataset, not across datasets
3.1.2
3.1.3
3.2
RELREC
CG0201
IDVAR={data($idvar)} is not allowed as USUBJID=null and IDVARVAL=null
]]>
When QORIG = 'ASSIGNED' then QEVAL may not be null
For subjective data (when QORIG='ASSIGNED'), QEVAL should be populated and the value should reflect the role of the person or institution assigning the value
3.1.2
3.1.3
3.2
SUPPQUAL
CG0202
QEVAL may not be null when QORIG='ASSIGNED'
]]>
When SEUPDES = null then ETCD may not be 'UNPLAN'
3.1.2
3.1.3
3.2
SE
CG0210
ETCD='UNPLAN' for SEUPDES=null
]]>
TAETORD must be an integer
Planned Order of Element within Arm (TAETORD) variable value must be an integer
3.1.2
3.1.3
3.2
TA
CG0248
TAETORD={data($taetord)} must be an integer
]]>
When TSVCDVER is populated then TSVCDREF must be populated
The Name of the Reference Terminology (TSVCDREF) must be populated when the Version of the Reference Terminology (TSVCDVER) is populated
3.1.2
3.1.3
3.2
TS
CG0266
TSVCDVER='{data($tsvcdver)}' but TSVCDREF=null
]]>
TSVAL must be between 0 and 1, when TSPARMCD = 'RANDQT'
For the trial summary parameter Randomization Quotient (TSPARMCD = 'RANDQT'), the value must always be a number between 0 and 1, with some cases where the ratio might be equal to 1
3.1.2
3.1.3
3.2
TS
CG0280
0 and TSVAL <= 1 :)
xquery version "3.0";
declare namespace def = "http://www.cdisc.org/ns/def/v2.0";
declare namespace def21 = "http://www.cdisc.org/ns/def/v2.1";
declare namespace odm="http://www.cdisc.org/ns/odm/v1.3";
declare namespace data="http://www.cdisc.org/ns/Dataset-XML/v1.0";
declare namespace xlink="http://www.w3.org/1999/xlink";
declare namespace xs="http://www.w3.org/2001/XMLSchema";
declare namespace functx = "http://www.functx.com";
(: "declare variable ... external" allows to pass $base and $define from an external programm :)
declare variable $base external;
declare variable $define external;
declare variable $defineversion external;
(: let $base := '/db/fda_submissions/cdisc01/' :)
(: let $define := 'define2-0-0-example-sdtm.xml' :)
let $definedoc := doc(concat($base,$define))
(: iterate over all TS datasets (there should be only one) :)
for $itemgroup in $definedoc//odm:ItemGroupDef[@Name='TS']
(: Get the OID for the TSVAL and TSPARMCD variables :)
let $tsvaloid := (
for $a in $definedoc//odm:ItemDef[@Name='TSVAL']/@OID
where $a = $definedoc//odm:ItemGroupDef[@Name='TS']/odm:ItemRef/@ItemOID
return $a
)
let $tsparmcdoid := (
for $a in $definedoc//odm:ItemDef[@Name='TSPARMCD']/@OID
where $a = $definedoc//odm:ItemGroupDef[@Name='TS']/odm:ItemRef/@ItemOID
return $a
)
(: get the dataset :)
let $tsdatasetname := (
if($defineversion = '2.1') then $itemgroup/def21:leaf/@xlink:href
else $itemgroup/def:leaf/@xlink:href
)
let $tsdatasetdoc := (
if($tsdatasetname) then doc(concat($base,$tsdatasetname))
else ()
)
(: look for a record with TSPARMCD='RANDQT' - we assume there is only 1 :)
for $randqtrecord in $tsdatasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$tsparmcdoid and @Value='RANDQT']]
let $recnum := $randqtrecord/@data:ItemGroupDataSeq
(: get the value of TSVAL in this record (if any) :)
let $tsval := $randqtrecord/odm:ItemData[@ItemOID=$tsvaloid]/@Value
(: TSVAL != null then TSVAL > 0 and TSVAL <= 1 :)
where $tsval and not($tsval castable as xs:double and xs:double($tsval) > 0 and xs:double($tsval) <=1 )
return TSVAL={data($tsval)} whereas a number >0 and <=1 was expected
]]>
PC dataset must be included when PP dataset is present
Pharmacokinetic Concentrations (PC) dataset should be included, when a Pharmacokinetic Parameters(PP) dataset is present
3.1.2
3.1.3
3.2
PP
PC
CG0318
The PP dataset is present in the study but the PC dataset is not present in study
]]>
The combination of ELEMENT, TESTRL TEENRL, and TEDUR must be unique for each ETCD
The combination of Description of Element (ELEMENT), Rule for Start of Element (TESTRL), Rule for End of Element (TEENRL), and Planned Duration of Element (TEDUR) should be unique for each Element Code (ETCD)
3.1.2
3.1.3
3.2
TE
1]
(: and get the value :)
let $element2 := $record/odm:ItemData[@ItemOID=$elementoid]/@Value
let $testrl2 := $record/odm:ItemData[@ItemOID=$testrloid]/@Value
let $teenrl2 := $record/odm:ItemData[@ItemOID=$teenrloid]/@Value
let $tedur2 := $record/odm:ItemData[@ItemOID=$teduroid]/@Value
let $recnum2 := $record/@data:ItemGroupDataSeq
(: the values for ELEMENT, TESTRL, TEENRL, and TEDUR must be the same as in the first record :)
where (not($element=$element2) or not($testrl=$testrl2) or not($teenrl=$teenrl2) or not($tedur=$tedur2))
return Records {data($recnum)} and {data($recnum2)} with ETCD='{data($etcd)}' do not have the same combination of ELEMENT, TESTRL, TEENRL, and TEDUR
]]>
The value of --TESTCD must be different from 'OTHER'
Test Code variables (--TESTCD) should not be populated with values of 'OTHER'
3.1.2
3.1.3
3.2
FINDINGS
CG0341
Value of {data($testcdname)}='{data($testcd)}' is not allowed to be equal to 'OTHER'
]]>
The value of --TESTCD must be different from 'OTHER'
Test Code variables (--TESTCD) should not be populated with values of 'OTHER'
3.1.2
3.1.3
3.2
FINDINGS
CG0341
Value of {data($testcdname)}='{data($testcd)}' is not allowed to be equal to 'OTHER'
]]>
--TRT is not allowed to have the value 'OTHER'
Test Code variables (--TESTCD) should not be populated with values of 'OTHER'
3.1.2
3.1.3
3.2
INTERVENTIONS
CG0342
Value of {data($trtname)}='{data($trt)}' is not allowed to be equal to 'OTHER'
]]>
--TRT is not allowed to have the value 'OTHER'
Test Code variables (--TESTCD) should not be populated with values of 'OTHER'
3.1.2
3.1.3
3.2
INTERVENTIONS
CG0342
Value of {data($trtname)}='{data($trt)}' is not allowed to be equal to 'OTHER'
]]>
The value of --TERM must be different from 'OTHER'
Reported Term variables (--TERM) should not be populated with values of 'OTHER'
3.1.2
3.1.3
3.2
EVENTS
CG0343
Value of {data($termname)}='{data($term)}' is not allowed to be equal to 'OTHER'
]]>
The value of --TERM must be different from 'OTHER'
Reported Term variables (--TERM) should not be populated with values of 'OTHER'
3.1.2
3.1.3
3.2
EVENTS
CG0343
Value of {data($termname)}='{data($term)}' is not allowed to be equal to 'OTHER'
]]>
The value of --TESTCD must be different from 'MULTIPLE'
Test Code variables (--TESTCD) should not be populated with values of 'MULTIPLE'
3.1.2
3.1.3
3.2
FINDINGS
CG0344
Value of {data($testcdname)}='{data($testcd)}' is not allowed to be equal to 'MULTIPLE'
]]>
The value of --TESTCD must be different from 'MULTIPLE'
Test Code variables (--TESTCD) should not be populated with values of 'MULTIPLE'
3.1.2
3.1.3
3.2
FINDINGS
CG0344
Value of {data($testcdname)}='{data($testcd)}' is not allowed to be equal to 'MULTIPLE'
]]>
The value of --TRT must be different from 'MULTIPLE'
Name of Treatment variables (--TRT) should not be populated with values of 'MULTIPLE'
3.1.2
3.1.3
3.2
INTERVENTIONS
CG0345
Value of {data($trtname)}='{data($trt)}' is not allowed to be equal to 'MULTIPLE'
]]>
The value of --TRT must be different from 'MULTIPLE'
Name of Treatment variables (--TRT) should not be populated with values of 'MULTIPLE'
3.1.2
3.1.3
3.2
INTERVENTIONS
CG0345
Value of {data($trtname)}='{data($trt)}' is not allowed to be equal to 'MULTIPLE'
]]>
The value of --TERM must be different from 'MULTIPLE'
Reported Term variables (--TERM) should not be populated with values of 'MULTIPLE'
3.1.2
3.1.3
3.2
EVENTS
CG0346
Value of {data($termname)}='{data($term)}' is not allowed to be equal to 'MULTIPLE'
]]>
The value of --TERM must be different from 'MULTIPLE'
Reported Term variables (--TERM) should not be populated with values of 'MULTIPLE'
3.1.2
3.1.3
3.2
EVENTS
CG0346
Value of {data($termname)}='{data($term)}' is not allowed to be equal to 'MULTIPLE'
]]>
Value for TSVALCD must be consistent within TSVAL - When TSVAL != null and TSVALCD != null then TSVALCD and TSVAL have a one-to-one relationship.
When TSVAL != null and TSVALCD != null then TSVALCD and TSVAL have a one-to-one relationship
3.1.3
3.2
TS
CG0265
Inconsistent value for TSVAL within TSVALCD in dataset {data($datasetname)}. {data($uniquetsvalvaluescount)} different TSVAL values were found for TSVALCD={data($tsvalcduniquevalue)}
]]>
ECDOSTXT may not be null when ECDOSE is null and ECOCCUR does not equal 'N'
Dose Description (ECDOSTXT) should be populated when Dose (ECDOSE) is null (and ECOCCUR does not equal 'N')
3.2
EC
ECDOSTXT must be populated when ECDOSE=null
]]>
--TOX variable may not be present when --TOXGR variable is missing
Toxicity (--TOX) variable should not be present in the domain, when the Toxicity Grade (--TOXGR) variable is missing
3.1.2
3.1.3
3.2
LB
AE
SD1280
{data($toxname)} is present, although {data($toxgrname)} is absent in dataset {data($name)}
]]>
When --ELTM, --TPTNUM, and --TPT is not present in the dataset then --TPTREF may not be present in the dataset
Time Point Reference (--TPTREF) variable should not be present in the domain, when the Planned Elapsed Time from Time Point Ref (--ELTM) variable, Planned Time Point Number (--TPTNUM) variable, and Planned Time Point (--TPT) variable are missing
3.1.2
3.1.3
3.2
ALL
CG0093
Variable {data($tptrefname)} is present in dataset {data($name)} although {data($eltmname)}, {data($tptnumname)} and {data($tptname)} are not present in the dataset
]]>
--LAT variable may not be present when --LOC variable is missing
Laterality (--LAT) variable should not be present in the domain, when the Location (--LOC) variable is missing
3.1.3
3.2
MI
MO
TU
VS
FA
SR
EX
EC
PR
CG0095
Variable {data($locname)} is absent in dataset {data($name)} but {data($latname)} is present in the dataset
]]>
Portion or Totality (--PORTOT) variable may not be present, when the Location (--LOC) variable is missing
Portion or Totality (--PORTOT) variable should not be present in the domain, when the Location (--LOC) variable is missing
3.1.3
3.2
INTERVENTIONS
FINDINGS
CG0115
{data($portotname)} is present although {data($locname)} is present in dataset {data($name)}
]]>
Directionality (--DIR) variable may not be present, when the Location (--LOC) variable is missing
Directionality (--DIR) variable should not be present in the domain, when the Location (--LOC) variable is missing
3.1.3
3.2
INTERVENTIONS
FINDINGS
CG0116
{data($dirname)} is present although {data($locname)} is present in dataset {data($name)}
]]>
When TIVERS present in dataset then IETESTCD must be unique within TIVERS
A value of Incl/Excl Criterion Short Name (IETESTCD) must be unique within a version of inclusion/exclusion criteria (TIVERS)
3.1.2
3.1.3
3.2
TI
CG0255
Records {data($recnum)} and {data($recnumnext)} have the same value for IETESTCD='{data($ietestcd)}' and TIVERS={data($tivers)}
]]>
Value for --DECOD must be consistent within --PTCD
All values of Dictionary-Derived Term (--DECOD) should be the same for a given value of Preferred Term Code (--PTCD)
3.1.3
3.2
EVENTS
1] (: start from the second one :)
let $recnum2 := $record/@data:ItemGroupDataSeq
(: as we grouped, the value of PTCD is the same, but we need to check on -DECOD :)
let $decod2 := $record/odm:ItemData[@ItemOID=$decodoid]/@Value
(: return {data($ptcd)} - {data($decod)} - {data($decod2)} :)
(: the two -DECOD values must be identical, as they have the same value for -PTCD :)
where not($decod1 = $decod2)
return Inconsistent value for {data($decodname)} within {data($ptcdname)}: Record {data($recnum2)} has {data($decodname)}={data($decod2)} whereas recordnumber={data($recnum1)} has {data($decodname)}={data($decod1)} for the same value of {data($ptcdname)}={data($ptcd)}
]]>
Value for --PTCD must be consistent within --DECOD
All values of Preferred Term Code (--PTCD) should be the same for a given value of Dictionary-Derived Term (--DECOD)
3.1.3
3.2
EVENTS
1] (: start from the second one :)
let $recnum2 := $record/@data:ItemGroupDataSeq
(: as we grouped, the value of PTCD is the same, but we need to check on -DECOD :)
let $ptcd2 := $record/odm:ItemData[@ItemOID=$ptcdoid]/@Value
(: the two -PTCD values must be identical, as they have the same value for -DECOD :)
where not($ptcd1 = $ptcd2)
return Inconsistent value for {data($ptcdname)} within {data($decodname)}: Record {data($recnum2)} has {data($ptcdname)}={data($ptcd2)} whereas recordnumber={data($recnum1)} has {data($ptcdname)}={data($ptcd1)} for the same value of {data($decodname)}={data($decod)}
]]>
--DECOD must be populated, when --PTCD is populated
Dictionary-Derived Term (--DECOD) should be populated when Preferred Term Code (--PTCD) is populated
3.1.2
3.1.3
3.2
EVENTS
Missing value for {data($decodname)} with {data($ptcdname)}='{data($decod)}' is populated
]]>
--ENRTPT must be populated, when --ENTPT is populated -
End Relative to Reference Time Point (--ENRTPT) must be populated when End Reference Time Point (--ENTPT) is populated
3.1.2
3.1.3
3.2
ALL
Missing value for {data($enrtptname)}, when {data($entptname)} is populated, value = {data($entptvalue)}
]]>
--ENRTPT must be populated, when --ENTPT is populated -
End Relative to Reference Time Point (--ENRTPT) must be populated when End Reference Time Point (--ENTPT) is populated
3.1.2
3.1.3
3.2
ALL
Missing value for {data($enrtptname)}, when {data($entptname)} is populated, value = {data($entptvalue)}
]]>
--STRTPT must be populated, when --STTPT is populated
Start Relative to Reference Time Point (--STRTPT) must be populated when Start Reference Time Point (--STTPT) is populated
3.1.2
3.1.3
3.2
ALL
No value for {data($strtptname)} was found although there is a value for {data($sttptname)}={data($sttptvalue)}
]]>
--REASND may not be present in dataset when --PRESP not present in dataset then (Interventions, Events, except for DS,DV,EX)
Reason Not Done (--REASND) variable should not be present in the domain, when the Pre-specified (--PRESP) variable is missing
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
CG0053
{data($reasndname)} is present although {data($prespname)} is absent
]]>
--STAT may not present in dataset when --PRESP not present in dataset then (Interventions,Events, except for DS,DV,EX)
Completion Status (--STAT) variable should not be present in the domain, when the Pre-specified (--PRESP) variable is missing
3.1.2
3.1.3
3.2
INTERVENTIONS
EVENTS
CG0056
{data($statname)} is present although {data($prespname)} is absent
]]>
TSVAL for ADDON record must be 'Y' or 'N'
TSVAL for ADDON record must be 'Y' or 'N'
3.1.2
3.1.3
3.2
TS
CG0269
TSVAL='{data($tsval)}' for TSPARMCD='ADDON' is expected to be in ('N','Y')
]]>
TSVAL for ADAPT record must be 'Y' or 'N'
TSVAL for ADAPT record must be 'Y' or 'N'.
3.1.2
3.1.3
3.2
TS
CG0282
TSVAL='{data($tsval)}' for TSPARMCD='ADAPT' is expected to be in ('N','Y')
]]>
TSVAL may not be populated with a value from the ISO 21090 null flavor codelist
TSVAL should not be populated with a value from the ISO 21090 null flavor codelist, or synonyms of the values. The TSVALNF variable should be used to capture these values, not TSVAL
3.1.3
3.2
TS
CG0291
As TSVALNF=null, TSVAL={data($tsval)} is not allowed to come out of the list of ISO-21090 null flavors ({data($nfvalues)}
]]>
LBTOXGR must be a numeric value when a numeric scale is used
When a numeric scale is used (Grade 1, Grade 2, etc.), LBTOXGR should only contain the number
3.1.2
3.1.3
3.2
LB
CG0185
0
return Value of LBTOXGR={data($lbtoxgr)} represents a numeric scale but is not a complete number
]]>
At least one timing variable must be present in the dataset
All domains based on the general observation classes (Interventions, Events, Findings) should have at least one Timing variable present, except for: IE, SC
3.1.2
3.1.3
3.2
INTERVENTIONS
FINDINGS
EVENTS
CG0219
{data($timingvarsdomain)} :)
(: create a list of the variables for this dataset :)
let $datasetvars := (
for $a in $itemgroupdef/odm:ItemRef/@ItemOID
return $definedoc//odm:ItemDef[@OID=$a]/@Name
)
(: return {data($datasetvars)} :)
(: count the number of variables in the intersection of allowed timing variables and the variables in this dataset :)
let $intersection := distinct-values($timingvarsdomain[.=$datasetvars])
(: return {data($intersection)} :)
let $count := count($intersection)
(: if the count of items in the intersection = 0, there is no timing variable in the dataset :)
where $count=0
return No timing variables have been defined in dataset {data($name)}
]]>
DOMAIN value length must be 2, except for AP, RELREC
The value of DOMAIN should be no more than 2 characters in length, excluding Associated Persons domains
3.1.2
3.1.3
3.2
ALL
CG0308
The value for DOMAIN in the dataset does not consist of exactly 2 characters: DOMAIN='{data($domainvalue)}' was found
]]>
DOMAIN value length must be 2, except for AP, RELREC
The value of DOMAIN should be no more than 2 characters in length, excluding Associated Persons domains
ALL
3.1.2
3.1.3
3.2
CG0308
The value for DOMAIN in the dataset does not consist of exactly 2 characters: DOMAIN='{data($domainvalue)}' was found
]]>
TDSTOFF must be either 0 or a positive ISO 8601 Duration format
Offset from the Anchor (TDSTOFF) variable value must be either 0, ISO 8601 format for duration (e.g. P80Y), or null
3.2
TD
CG0376
TDSTOFF must either be '0' or a non-negative duration. TDSTOFF='{data($tdstoff)}' was found
]]>
When a record exists where TSPARMCD = 'HLTSUBJI' and TSVAL = 'Y' then for TSPARMCD = 'TDIGRP', TSVAL must be null
When the study population is healthy subjects (TSPARMCD = 'HLTSUBJI' and TSVAL = 'Y'), the Diagnosis Group parameter should be provided with a null Parameter Value (TSVAL should be null when TSPARMCD = 'TDIGRP')
3.1.3
3.2
TS
CG0272
TSVAL='{data($tdigrpvalue)}' for TSPARMCD='TDIGRP' is expected to be null as a record with TSPARMCD='HLTSUBJI and TSVAL='Y' exists
]]>
TDIGRP record must be populated in TS, when HLTSUBJI = 'N'
TDIGRP record must be populated in TS, when HLTSUBJI = 'N' - 'Diagnosis Group' (TDIGRP) record must be populated in Trial Summay (TS) domain, when study population is unhealthy subjects (HLTSUBJI = 'N'). It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.3
3.2
TS
Missing TDIGRP Trial Summary Parameter in dataset TS
]]>
When a record exists where TSPARMCD = 'ADDON' and TSVAL = 'Y' then for TSPARMCD = 'CURTRT', TSVAL must be populated
When test product is added to existing treatment (TSPARMCD = 'ADDON' and TSVAL = 'Y'), the Current Therapy or Treatment parameter should be provided with Parameter Value populated (TSVAL should not be null when TSPARMCD = 'CURTRT')
3.1.2
3.1.3
3.2
TS
CG0275
Null value for TSVAL for TSPARMCD='CURTRT' found although a record with TSPARMCD='ADDON and TSVAL='Y' exists
]]>
When a record exists where TSPARMCD = 'STYPE' and TSVAL = 'INTERVENTIONAL' then for TSPARMCD = 'TRT', TSVAL must be populated
When the study type is interventional (TSPARMCD = 'STYPE' and TSVAL = 'INTERVENTIONAL'), the Investigational Therapy or Treatment parameter should be provided with Parameter Value populated (TSVAL should not be null when TSPARMCD = 'TRT')
TS
3.1.3
3.2
CG0276
Null value for TSVAL for TSPARMCD='TRT' found although a record with TSPARMCD='STYPE and TSVAL='INTERVENTIONAL' exists
]]>
INTMODEL record must be present when STYPE='INTERVENTIONAL'
'Intervention Model' (INTMODEL) record must be populated in Trial Summay (TS) domain, when study type is 'INTERVENTIONAL'. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing INTMODEL Trial Summary Parameter: No populated TSPARMCD=INTMODEL record was found although a record with TSPARMCD=STYPE and TSVAL=INTERVENTIONAL is present
]]>
INTTYPE record must be present when STYPE='INTERVENTIONAL'
'Intervention Type' (INTTYPE) record must be populated in Trial Summay (TS) domain, when study type is 'INTERVENTIONAL'. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.3
3.2
TS
Missing INTTYPE Trial Summary Parameter: No populated TSPARMCD=INTTYPE record was found although a record with TSPARMCD=STYPE and TSVAL=INTERVENTIONAL is present
]]>
PCLAS must be populated when STYPE='INTERVENTIONAL'
When the study type is interventional (TSPARMCD = 'STYPE' and TSVAL = 'INTERVENTIONAL'), the Pharmacologic Class parameter should be provided with Parameter Value populated (TSVAL should not be null when TSPARMCD = 'PCLAS')
3.1.2
3.1.3
3.2
TS
Missing PCLAS Trial Summary Parameter, although there is a record with TSPARMCD=STYPE and TSVAL=INTERVENTIONAL
]]>
EPOCH value must be provided, when DSCAT is 'DISPOSITION EVENT'
Epoch (EPOCH) variable should be provided, when Category for Disposition Event (DSCAT) equals 'DISPOSITION EVENT'
3.1.2
3.1.3
3.2
DS
Missing EPOCH value, although DSCAT is 'DISPOSITION EVENT'
]]>
DSDECOD must be 'COMPLETED', when DSTERM='COMPLETED'
When Reported Term for the Disposition Event (DSTERM) is 'COMPLETED', Standardized Disposition Term (DSDECOD) should have the same value 'COMPLETED'
3.1.2
3.1.3
3.2
DS
Value for DSDECOD='{data($dsdecod)}' must be 'COMPLETED', as DSTERM='COMPLETED'
]]>
DSDECOD must be the same as DSTERM, when DSCAT='PROTOCOL MILESTONE'
Reported Term for the Disposition Event (DSTERM) and Standardized Disposition Term (DSDECOD) should contain the same value, when Category for Disposition Event (DSCAT) is 'PROTOCOL MILESTONE'
DS
3.1.2
3.1.3
3.2
Value for DSDECOD='{data($dsdecod)}' is not equal to value for DSTERM='{data($dsterm)}', as DSCAT='PROTOCOL MILESTONE'
]]>
'DEATH' record for subject msut be present in DS domain when SSSTRESC='DEAD'
All subjects who have Death records (SSSTRESC = 'DEAD') in Survival Status (SS) domain should also have death records (DSDECOD='DEATH') in Disposition (DS) domain
3.2
SS
DS
No record was found in DS with DSDECOD='DEATH' for the record in dataset {data($ssname)} with SSSTRESC='DEAD' for subject with USUBJID='{data($ssusubjid)}'
]]>
DSSTDTC for DEATH record must be the same as DM.DTHDTC
DEATH records (DSDECOD='DEATH') in Disposition (DS) domain should have Start Date of Event (DSDTDTC) equals to subject's Date/Time of Death (DTHDTC) populated in Demographics (DM) domain. Subject's Date/Time of Death info should be consistent across all domain
3.1.3
3.2
DS
)
(: get the DS dataset(s) :)
for $datasetdef in $definedoc//odm:ItemGroupDef[@Name='DS' or @Domain='DS']
let $name := $datasetdef/@Name
(: get the location and the dataset document itself :)
let $datasetloc := (
if($defineversion = '2.1') then $datasetdef/def21:leaf/@xlink:href
else $datasetdef/def:leaf/@xlink:href
)
let $datasetdoc := (
if($datasetloc) then doc(concat($base,$datasetloc))
else ()
)
(: get the OID of USUBJID, DSDECOD, DSDTDTC :)
let $usubjidoid := (
for $a in $definedoc//odm:ItemDef[@Name='USUBJID']/@OID
where $a = $datasetdef/odm:ItemRef/@ItemOID
return $a
)
let $dsdecodoid := (
for $a in $definedoc//odm:ItemDef[@Name='DSDECOD']/@OID
where $a = $datasetdef/odm:ItemRef/@ItemOID
return $a
)
let $dsstdtcoid := (
for $a in $definedoc//odm:ItemDef[@Name='DSSTDTC']/@OID
where $a = $datasetdef/odm:ItemRef/@ItemOID
return $a
)
(: iterate over all the records that for which DSDECOD='DEATH' :)
for $record in $datasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$dsdecodoid and @Value='DEATH']]
let $recnum := $record/@data:ItemGroupDataSeq
(: get the values of USUBJID and DSDTDTC :)
let $usubjid := $record/odm:ItemData[@ItemOID=$usubjidoid]/@Value
let $dsstdtc := $record/odm:ItemData[@ItemOID=$dsstdtcoid]/@Value
(: and look them up in the DM-USUBJID- structure,
retrieving the value for DTHDTC for the given subject :)
let $dthdtc := $dthdtcpairs[@usubjid=$usubjid]/@dthdtc
(: DTHDTC from DM and DSSTDTC from DS must be equal :)
where not($dsstdtc = $dthdtc)
return DSSTDTC value '{data($dsstdtc)}' does not correspond to DM.DTHDTC='{data($dthdtc)}' for USUBJID={data($usubjid)}
]]>
Subjects with DSDECOD='PROTOCOL VIOLATION' in DS must have records in DV
Subjects who has DSDECOD='PROTOCOL VIOLATION' records in Disposition (DS) domain should have supportive records with details in Protocol Deviations (DV) domain
3.1.3
3.2
DS
No record was found in DV for subject with USUBJID='{data($dsusubjid)}' although there is a record in DS with DSDECOD='PROTOCOL DEVIATION'
]]>
--STDTC may not be before RFICDTC
'All records in Disposition Event (DS) and Protocol Diviation (DV) domains should have Start Date/Time of Event (--STDTC) equal or after subject's Date/Time of Informed Consent (RFICDTC) in Demographics (DM) domain
3.1.3
3.2
DS
DV
)
(: get the DS and DV dataset :)
for $datasetdef in $definedoc//odm:ItemGroupDef[@Name='DS' or @Domain='DS' or @Name='DV' or @Domain='DV']
let $name := $datasetdef/@Name
(: get the location and the dataset document itself :)
let $datasetloc := (
if($defineversion = '2.1') then $datasetdef/def21:leaf/@xlink:href
else $datasetdef/def:leaf/@xlink:href
)
let $datasetdoc := (
if($datasetloc) then doc(concat($base,$datasetloc))
else ()
)
(: get the OID of USUBJID and --STDTC :)
let $usubjidoid := (
for $a in $definedoc//odm:ItemDef[@Name='USUBJID']/@OID
where $a = $datasetdef/odm:ItemRef/@ItemOID
return $a
)
let $stdtcoid := (
for $a in $definedoc//odm:ItemDef[ends-with(@Name,'STDTC')]/@OID
where $a = $datasetdef/odm:ItemRef/@ItemOID
return $a
)
(: and the full name of --STDTC :)
let $stdtcname := $definedoc//odm:ItemDef[@OID=$stdtcoid]/@Name
(: iterate over all the records that do have a value for --STDTC :)
for $record in $datasetdoc//odm:ItemGroupData[odm:ItemData[@ItemOID=$stdtcoid]/@Value]
let $recnum := $record/@data:ItemGroupDataSeq
(: get the values of USUBJID and -STDTC :)
let $usubjid := $record/odm:ItemData[@ItemOID=$usubjidoid]/@Value
let $stdtc := $record/odm:ItemData[@ItemOID=$stdtcoid]/@Value
(: and look them up in the DM-USUBJID-RFICDTC structure,
retrieving the value for RFICDTC for the given subject :)
let $rficdtc := $rficdtcpairs[@usubjid=$usubjid]/@rficdtc
(: -DTC must be after RFICDTC - but first need to check for the correct datatype :)
where $rficdtc castable as xs:dateTime and $stdtc castable as xs:dateTime and xs:dateTime($stdtc) < xs:dateTime($rficdtc)
return {data($stdtcname)}={data($stdtc)} is before DM.RFICDTC={data($rficdtc)} in dataset {data($name)}
]]>
--STRESC must be populated, when --STAT is null
Character Result/Finding in Std Format (--STRESC) value should not be NULL, when Status Flag (--STAT) value is null
3.1.2
3.1.3
3.2
FINDINGS
Missing value for {data($strescname)}, when {data($statname)}=null
]]>
--STRESC must be populated, when --STAT is null
Character Result/Finding in Std Format (--STRESC) value should not be NULL, when Status Flag (--STAT) value is null
3.1.2
3.1.3
3.2
FINDINGS
Missing value for {data($strescname)}, when {data($statname)}=null
]]>
Treatment Emergent info for Adverse Event must be present
A treatment-emergent flag should be included
in SUPPAE according to SDTM IG v3.1.2 #8.4.3
3.1.2
3.1.3
3.2
AE
SUPPAE
SD1097
No Treatment Emergent info for Adverse Event - SUPPAE QVAL does not have an entry AETRTEM in ValueList
]]>
Value for COUNTRY (DM) must be found in ISO 3166
Value for the Country (COUNTRY) variable must be populated using terms found in ISO 3166
3.1.2
3.1.3
3.2
DM
Value for COUNTRY '{data($country)}' is not found in ISO 3166
]]>
Invalid value for ACTARMCD, more than 20 characters - The value of Actual Arm Code (ACTARMCD) should be no more than 20 characters in length
3.1.3
3.2
DM
20
return Invalid value for ACTARMCD in dataset {data($datasetname)}, it's length is more than 20 characters, value={data($actarmcdvalue)}
]]>
Invalid value for ACTARMCD, no match with TA - Actual Arm Code (ACTARMCD) values should match entries in the Trial Arms (TA) dataset, except for subjects who failed screening ('SCRNFAIL'), or were not fully assigned to an Arm ('NOTASSGN'), or randomized but not treated ('NOTTRT'), or recieved non-planned treatment ('UNPLAN')
3.1.3
3.2
3.1.2
3.1.3
3.2
DM
Invalid value for ACTARMCD, value={data($actarmcdvalue)} in dataset DM
]]>
Invalid value for ACTARM - Description of Actual Arm (ACTARM) values should match entries in the Trial Arms (TA) dataset, except for subjects who failed screening ('Screen Failure'), or were not fully assigned to an Arm ('Not Assigned'), or randomized, but not treated ('Not Treated') or recieved non-planned treatment ('Unplanned Treatment')
3.1.3
3.2
DM
TA
Invalid value for ACTARM, value={data($actarmvalue)} in dataset {data($datasetname)}
]]>
Missing value for DTHFL, when DTHDTC is populated - Subject Death Flag (DTHFL) value must equal 'Y', when Date/Time of Death (DTHDTC) is provided
3.1.3
3.2
DM
Missing value for DTHFL, when DTHDTC is populated
]]>
Missing value for DTHDTC, when DTHFL is populated - Date/Time of Death (DTHDTC) should be provided, when subject died (DTHFL=Y)
3.1.3
3.2
DM
Missing value for DTHDTC, when DTHFL is populated
]]>
Value for --PTCD not found in MedDRA dictionary - Value for Preferred Term Code (--PTCD) variable must be populated using a Preferred Term Code of the MedDRA dictionary of a version specified in the define.xml.
3.1.3
3.2
AE
MH
CE
Value '{data($ptcdvalue)}' for {data($ptcdname)} was not found in the MedDRA dictionary
]]>
Value for --LLT not found in MedDRA dictionary - Value for Lowest Level Term (--LLT) variable must be populated using a Lowest Level Term of the MedDRA dictionary of a version specified in the define.xml (Case-insensitive).
3.1.3
3.2
AE
MH
CE
Value '{data($lltvalue)}' for {data($lltname)} was not found in the MedDRA dictionary
]]>
Value for --LLT is in incorrect case - Case for the Dictionary-Derived Term (--DECOD) variable must be sentence case using a Preferred Term of the MedDRA dictionary of a version specified in the define.xml (Case-sensitive).
3.1.3
3.2
AE
MH
CE
Value '{data($lltvalue)}' for {data($lltname)} is in incorrect case from the MedDRA dictionary
]]>
Value for --LLTCD not found in MedDRA dictionary - Value for Lowest Level Term Code (--LLTCD) variable must be populated using a Lowest Level Term Code of the MedDRA dictionary of a version specified in the define.xml.
3.1.3
3.2
AE
MH
CE
Value '{data($lltcdvalue)}' for {data($lltcdname)} was not found in the MedDRA dictionary
]]>
Value for --HLT not found in MedDRA dictionary - Value for High Level Term (--HLT) variable must be populated using a High Level Term of the MedDRA dictionary of a version specified in the define.xml (Case-insensitive).
3.1.3
3.2
AE
MH
CE
Value '{data($hltvalue)}' for {data($hltname)} was not found in the MedDRA dictionary
]]>
Value for --HLT is in incorrect case - Case for High Level Term (--HLT) variable must be sentence case using a High Level Term of the MedDRA dictionary of a version specified in the define.xml (Case-sensitive).
3.1.3
3.2
AE
MH
CE
Value '{data($hltvalue)}' for {data($hltname)} is in incorrect case from the MedDRA dictionary
]]>
Value for --HLTCD not found in MedDRA dictionary - Value for High Level Term Code (--HLTCD) variable must be populated using a High Level Term Code of the MedDRA dictionary of a version specified in the define.xml.
3.1.3
3.2
AE
MH
CE
Value '{data($hltcdvalue)}' for {data($hltcdname)} was not found in the MedDRA dictionary
]]>
Value for --HLGT not found in MedDRA dictionary - Value for High Level Group Term (--HLGT) variable must be populated using a High Level Group Term of the MedDRA dictionary of a version specified in the define.xml (Case-insensitive).
3.1.3
3.2
AE
MH
CE
Value '{data($hlgtvalue)}' for {data($hlgtname)} was not found in the MedDRA dictionary
]]>
Value for --HLGT is in incorrect case - Case for High Level Group Term (--HLGT) variable must be sentence case using a High Level Group Term of the MedDRA dictionary of a version specified in the define.xml (Case-sensitive).
3.1.3
3.2
AE
MH
CE
Value '{data($hlgtvalue)}' for {data($hlgtname)} is in incorrect case from the MedDRA dictionary
]]>
Value for --HLGTCD not found in MedDRA dictionary - Value for High Level Group Term Code (--HLGTCD) variable must be populated using a High Level Group Term Code of the MedDRA dictionary of a version specified in the define.xml.
3.1.3
3.2
AE
MH
CE
Value '{data($hlgtcdvalue)}' for {data($hlgtcdname)} was not found in the MedDRA dictionary
]]>
Value for --BDSYCD not found in MedDRA dictionary - Value for Body System or Organ Class Code (--BDSYCD) variable should be populated using a System Organ Class Code of the MedDRA dictionary of a version specified in the define.xml
3.1.3
3.2
AE
MH
CE
Value '{data($bdsycdvalue)}' for {data($bdsycdname)} was not found in the MedDRA dictionary
]]>
Value for --SOC not found in MedDRA dictionary - Value for System Organ Class (--SOC) variable must be populated using a System Organ Class of the MedDRA dictionary of a version specified in the define.xml (Case-insensitive).
3.1.3
3.2
AE
MH
CE
Value '{data($socvalue)}' for {data($socname)} was not found in the MedDRA dictionary
]]>
Value for --SOC is in incorrect case - Case for System Organ Class (--SOC) variable must be sentence case using a System Organ Class of the MedDRA dictionary of a version specified in the define.xml (Case-sensitive).
3.1.3
3.2
AE
MH
CE
Value '{data($socvalue)}' for {data($socname)} is in incorrect case from the MedDRA dictionary
]]>
Value for --SOCCD not found in MedDRA dictionary - Value for System Organ Class Code (--SOCCD) variable must be populated using a System Organ Class Code of the MedDRA dictionary of a version specified in the define.xml.
3.1.3
3.2
AE
MH
CE
Value '{data($soccdvalue)}' for {data($soccdname)} was not found in the MedDRA dictionary
]]>
Missing TSVAL value - Value for Parameter Value (TSVAL) variable must be populated. TSVAL can only be null when Parameter Null Flavor (TSVALNF) variable value is populated.
3.1.3
3.2
TS
Missing TSVAL value
]]>
Missing TSVALNF value - Value for Parameter Null Flavor (TSVALNF) variable must be populated, when Parameter Value (TSVAL) variable value is missing
3.1.3
3.2
TS
Missing TSVALNF value
]]>
Invalid value for AGETXT - Age Range (AGETXT) variable values should be populated with 'number-number' format
3.1.3
3.2
DM
Invalid value for AGETXT. '{data($agetxtvalue)}' was found
]]>
Both AGE and AGETXT variables values are populated - Age (AGE) and Age Range (AGETXT) variables should never both be populated for the same subject
3.1.3
3.2
DM
Both AGE and AGETXT variables values are populated
]]>
Missing values for both AGE and AGETXT, when AGEU is provided - Either of Age (AGE) or Age Range (AGETXT) variable values should be provided, when Age Units (AGEU) are populated
3.1.3
3.2
DM
Missing values for both AGE and AGETXT, when AGEU is provided
]]>
Missing value for AGEU, when AGE or AGETXT is populated - Age Units (AGEU) variable values should be provided, when Age (AGE) or Age Range (AGETXT) variables values are populated
3.1.3
3.2
DM
Missing value for AGEU, when AGE or AGETXT is populated
]]>
AGE is not provided - Age (AGE) variable values should be provided, when Date/Time of Birth (BRTHDTC) variable values are populated
3.1.2
3.1.3
3.2
DM
AGE is not provided
]]>
Missing or redundant values for USUBJID and POOLID - Either Unique Subject Identifier (USUBJID) or Pool Identifier (POOLID) variables values and only one must be populated
3.1.3
3.2
ALL
Both USUBJID and POOLID in dataset {data($datasetname)} are NULL or both POOLID and USUBJID are populated
]]>
Missing or redundant values for USUBJID and POOLID - Either Unique Subject Identifier (USUBJID) or Pool Identifier (POOLID) variables values and only one must be populated
3.1.3
3.2
ALL
Both USUBJID and POOLID in dataset {data($datasetname)} are NULL or both POOLID and USUBJID are populated
]]>
Missing ADDON Trial Summary Parameter - Added on to Existing Treatments' (ADDON) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing ADDON Trial Summary Parameter in dataset TS
]]>
Missing AGEMAX Trial Summary Parameter - 'Planned Maximum Age of Subjects' (AGEMAX) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing AGEMAX Trial Summary Parameter in dataset TS
]]>
Missing AGEMIN Trial Summary Parameter - 'Planned Minimum Age of Subject' (AGEMIN) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing AGEMIN Trial Summary Parameter in dataset TS
]]>
Missing LENGTH Trial Summary Parameter - 'Trial Length' (LENGTH) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing LENGTH Trial Summary Parameter in dataset TS
]]>
Missing PLANSUB Trial Summary Parameter - 'Planned Number of Subjects' (PLANSUB) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing PLANSUB Trial Summary Parameter in dataset TS
]]>
Missing RANDOM Trial Summary Parameter - 'Trial is Randomized' (RANDOM) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing RANDOM Trial Summary Parameter in dataset TS
]]>
Missing SEXPOP Trial Summary Parameter - 'Sex of Participants' (SEXPOP) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing SEXPOP Trial Summary Parameter in dataset TS
]]>
Missing STOPRULE Trial Summary Parameter - 'Study Stop Rules' (STOPRULE) record may be populated in Trial Summay (TS) domain. It is permissible for SDTM IG v3.1.2 data and in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing STOPRULE Trial Summary Parameter in dataset TS
]]>
Missing TBLIND Trial Summary Parameter - 'Trial Blinding Schema' (TBLIND) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing TBLIND Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing TCNTRL Trial Summary Parameter - 'Control Type' (TCNTRL) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing TCNTRL Trial Summary Parameter in dataset TS
]]>
Missing TDIGRP Trial Summary Parameter - 'Diagnosis Group' (TDIGRP) record must be populated in Trial Summay (TS) domain, when study population is unhealthy subjects (HLTSUBJI = 'N'). It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing TDIGRP Trial Summary Parameter in dataset TS
]]>
Missing TINDTP Trial Summary Parameter - 'Trial Indication Type' (TINDTP) record must be populated in Trial Summay (TS) domain, when study type is 'INTERVENTIONAL'. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing TINDTP Trial Summary Parameter in dataset TS
]]>
Missing TITLE Trial Summary Parameter - 'Trial Title' (TITLE) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing TITLE Trial Summary Parameter in dataset TS
]]>
Missing TPHASE Trial Summary Parameter - 'Trial Phase Classification' (TPHASE) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing TPHASE Trial Summary Parameter in dataset TS
]]>
Missing TTYPE Trial Summary Parameter - 'Trial Type (TTYPE) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing TTYPE Trial Summary Parameter in dataset TS
]]>
Missing CURTRT Trial Summary Parameter - 'Current Therapy or Treatment' (CURTRT) record must be populated in Trial Summay (TS) domain, when ADDON is 'Y'. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing CURTRT Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing OBJPRIM Trial Summary Parameter - 'Trial Primary Objective' (OBJPRIM) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing OBJPRIM Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing SPONSOR Trial Summary Parameter - 'Clinical Study Sponsor' (SPONSOR) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing SPONSOR Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing TRT Trial Summary Parameter - 'Investigational Therapy or Treatment' (TRT) record must be populated in Trial Summary (TS) domain, when study type is 'INTERVENTIONAL'. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions.
3.1.2
3.1.3
3.2
TS
0
return Missing TRT Trial Summary Parameter in dataset {data($tsdatasetname)} where TSPARMCD=STYPE with TSVAL=INTERVENTIONAL
]]>
Missing REGID Trial Summary Parameter - 'Registry Identifier' (REGID) record may be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing REGID Trial Summary Parameter in dataset TS
]]>
Missing OUTMSPRI Trial Summary Parameter - 'Primary Outcome Measure' (OUTMSPRI) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing OUTMSPRI Trial Summary Parameter
]]>
Missing PCLAS Trial Summary Parameter - Pharmacological Class of Investigational Therapy' (PCLAS) record must be populated in Trial Summay (TS) domain, when study type is 'INTERVENTIONAL' and if Intervention Type (INTTYPE) is one for which pharmacological class is applicable. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions.
3.1.2
3.1.3
3.2
TS
Missing PCLAS Trial Summary Parameter, although there is a record with TSPARMCD=STYPE and TSVAL=INTERVENTIONAL
]]>
Missing FCNTRY Trial Summary Parameter - 'Planned Country of Investigational Sites' (FCNTRY) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing FCNTRY Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing ADAPT Trial Summary Parameter - 'Adaptive Design' (ADAPT) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing ADAPT Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing DCUTDTC Trial Summary Parameter - 'Data Cutoff Date' (DCUTDTC) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing DCUTDTC Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing DCUTDESC Trial Summary Parameter - 'Data Cutoff Description' (DCUTDESC) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing DCUTDESC Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing INTMODEL Trial Summary Parameter - 'Intervention Model' (INTMODEL) record must be populated in Trial Summay (TS) domain, when study type is 'INTERVENTIONAL'. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing INTMODEL Trial Summary Parameter: No populated TSPARMCD=INTMODEL record was found although a record with TSPARMCD=STYPE and TSVAL=INTERVENTIONAL is present
]]>
Missing NARMS Trial Summary Parameter - 'Planned Number of Arms' (NARMS) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing NARMS Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing STYPE Trial Summary Parameter - 'Study Type' (STYPE) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions
3.1.2
3.1.3
3.2
TS
Missing STYPE Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing INTTYPE Trial Summary Parameter - 'Intervention Type' (INTTYPE) record must be populated in Trial Summay (TS) domain, when study type is 'INTERVENTIONAL'. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions.
3.1.2
3.1.3
3.2
TS
Missing INTTYPE Trial Summary Parameter: No populated TSPARMCD=INTTYPE record was found although a record with TSPARMCD=STYPE and TSVAL=INTERVENTIONAL is present
]]>
Missing SSTDTC Trial Summary Parameter - 'Study Start Date' (SSTDTC) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions.
3.1.2
3.1.3
3.2
TS
Missing SSTDTC Trial Summary Parameter in dataset {data($tsdatasetname)}
]]>
Missing SENDTC Trial Summary Parameter - 'Study End Date' (SENDTC) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions.
3.1.2
3.1.3
3.2
TS
Missing SENDTC Trial Summary Parameter in dataset TS
]]>
Missing ACTSUB Trial Summary Parameter - 'Actual Number of Subjects' (ACTSUB) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions.
3.1.2
3.1.3
3.2
TS
Missing ACTSUB Trial Summary Parameter in dataset TS
]]>
Missing HLTSUBJI Trial Summary Parameter - 'Healthy Subject Indicator' (HLTSUBJI) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions.
3.1.2
3.1.3
3.2
TS
Missing HLTSUBJI Trial Summary Parameter in dataset TS
]]>
ACTARMCD does not equal ARMCD - A value for an Actual Arm Code (ACTARMCD) variable is expected to be equal to a value of an Arm Code (ARMCD) variable
3.1.3
3.2
DM
ACTARMCD, value={data($actarmcdvalue)} in dataset {data($tadatasetname)} does not equal ARMCD from TA
]]>
A value for an Actual Arm (ACTARM) variable is expected to be equal to a value of an Arm (ARM) variable.
3.1.2
3.1.3
3.2
DM
ACTARM, value={data($actarmvalue)} in dataset {data($dmdatasetname)} does not equal ARMCD from TA
]]>
Inconsistent value for --STTPT - Start Reference Time Point (--STTPT) value must be consistent for all records with same Subject (USUBJID) and Start Date/Time (--STDTC) values.
3.1.2
3.1.3
3.2
EVENTS
INTERVENTIONS
1]
(: get the record number and the value of --STTPT :)
let $recnum := $record/@data:ItemGroupDataSeq
let $sttptvalue := $record/odm:ItemData[@ItemOID=$sttptoid]/@Value
(: get the previous record, it must have the same value of --STTPT :)
let $precrecord := $record/preceding-sibling::odm:ItemGroupData[1] (: as they come in descending order :)
let $recnum2 := $precrecord/@data:ItemGroupDataSeq
let $sttptvalue2 := $precrecord/odm:ItemData[@ItemOID=$sttptoid]/@Value
(: both value of --STTPT must be equal. If not, report an error :)
return Inconsistent value for {data($sttptname)}: records with USUBJID={data($usubjid)} and {data($stdtcname)}={data($stdtcvalue)} have different values for {data($sttptname)}: Record {data($recnum)} has {data($sttptname)}={data($sttptvalue)} whereas record {data($recnum2)} has {data($sttptname)}={data($sttptvalue2)}
]]>
Inconsistent value for --TPT - Planned Time Point Name (--TPT) value must be consistent for all records with same Subject (USUBJID) and Assessment Date/Time (--DTC).
3.1.2
3.1.3
3.2
FINDINGS
1]
(: get the record number and the value of --TPT :)
let $recnum := $record/@data:ItemGroupDataSeq
let $tptvalue := $record/odm:ItemData[@ItemOID=$tptoid]/@Value
(: get the previous record, it must have the same value of --TPT :)
let $precrecord := $record/preceding-sibling::odm:ItemGroupData[1] (: as they come in descending order :)
let $recnum2 := $precrecord/@data:ItemGroupDataSeq
let $tptvalue2 := $precrecord/odm:ItemData[@ItemOID=$tptoid]/@Value
(: both values of --TPT must be equal. If not, report an error :)
return Inconsistent value for {data($tptname)}: records with USUBJID={data($usubjid)} and {data($dtcname)}={data($dtcvalue)} have different values for {data($tptname)}: Record {data($recnum)} has {data($tptname)}={data($tptvalue)} whereas record {data($recnum2)} has {data($tptname)}={data($tptvalue2)}
]]>
Invalid TSVCDREF value for INDIC - TSVCDREF variable value must be "SNOMED", when TSPARAMCD='INDIC'
3.1.2
3.1.3
3.2
TS
Invalid TSVCDREF value={data($tsvcdrefvalue)} for INDIC. The value must be 'SNOMED'
]]>
Invalid TSVCDREF value for CURTRT - TSVCDREF variable value must be 'UNII', when TSPARMCD='CURTRT'
3.1.2
3.1.3
3.2
TS
Invalid TSVCDREF value={data($tsvcdrefvalue)} for CURTRT in dataset TS. The value must be 'UNII'
]]>
Invalid TSVCDREF value for TRT - TSVCDREF variable value must be 'UNII', when TSPARMCD='TRT'
3.1.2
3.1.3
3.2
TS
Invalid TSVCDREF value for TRT: TSVCDREF variable value must be 'UNII', when TSPARMCD='TRT', value found is '{data($tsvcdref)}'
]]>
Invalid TSVCDREF value for PCLAS - TSVCDREF variable value must be 'NDF-RT', when TSPARMCD='PCLAS'
3.1.2
3.1.3
3.2
TS
Invalid TSVCDREF value={data($tsvcdrefvalue)} for PCLAS. The value must be 'NDF-RT'
]]>
Invalid TSVCDREF value for FCNTRY - TSVCDREF variable value must be "ISO 3166", when TSPARMCD='FCNTRY'
3.1.2
3.1.3
3.2
TS
Invalid TSVCDREF value={data($tsvcdrefvalue)} for FCNTRY. The value must be 'ISO 3166'
]]>
Invalid TSVAL value for DCUTDTC - TSVAL variable value must be in ISO 8601 format, when TSPARMCD='DCUTDTC'
3.1.2
3.1.3
3.2
TS
Invalid TSVAL value for DCUTDTC: value={data($tsvalvalue)} is not a valid ISO-8601 date
]]>
Invalid TSVAL value for NARMS - TSVAL variable value must be numeric, when TSPARMCD='NARMS'
3.1.2
3.1.3
3.2
TS
-1)
return Invalid TSVAL value for NARMS. A non-negative integer is expected, value found={data($tsvalvalue)}
]]>
Invalid TSVAL value for SSTDTC - TSVAL variable value must be in ISO 8601 format, when TSPARMCD='SSTDTC'
3.1.2
3.1.3
3.2
TS
Invalid TSVAL value {data($ssdtcval)} for Trial Summary Parameter SSTDTC Trial Summary Parameter TS
]]>
Invalid TSVAL value for SENDTC - TSVAL variable value must be in ISO 8601 format, when TSPARMCD='SETDTC'
3.1.2
3.1.3
3.2
TS
Invalid TSVAL value {data($sedtcval)} for Trial Summary Parameter SETDTC in dataset TS
]]>
Missing ACTSUB Trial Summary Parameter - 'Actual Number of Subjects' (ACTSUB) record must be populated in Trial Summay (TS) domain. It is expected for SDTM IG v3.1.2 data and required for data in all more recent SDTM versions.
3.1.2
3.1.3
3.2
TS
Missing ACTSUB Trial Summary Parameter in dataset TS
]]>
Invalid TSVCDREF value for COMPTRT - TSVCDREF variable value must be 'UNII', when TSPARMCD='COMPTRT'
3.1.2
3.1.3
3.2
TS
Invalid TSVCDREF value={data($tsvcdrefvalue)} for COMPTRT. The value must be 'UNII'
]]>
Invalid TSVALCD value for INDIC - TSVALCD for INDIC record must be a valid concept id from SNOMED CT
3.1.2
3.1.3
3.2
TS
Invalid TSVALCD, value={data($tsvalcdvalue)} for INDIC is not a valid SNOMED-CT code in dataset TS
]]>
Invalid TSVAL value for PCLAS - TSVAL for PCLAS record must be a valid term from NDF-RT
3.1.2
3.1.3
3.2
TS
Invalid TSVAL value='{data($tsvalvalue)}' for PCLAS
]]>
Invalid TSVALCD value for PCLAS - TSVALCD for PCLAS record must be a valid code from NDF-RT
3.1.2
3.1.3
3.2
TS
Invalid TSVALCD value={data($tsvalcdvalue)} for PCLAS
]]>
TSVAL/TSVALCD value mismatch for PCLAS - TSVAL and TSVALCD values must be populated from the same record in NDF-RT
3.1.2
3.1.3
3.2
TS
Invalid TSVAL value='{data($tsvalvalue)}' for PCLAS with TSVALCD={data($tsvalcdvalue)} - value from NLM web service found='{data($conceptName)}'
]]>
Dataset class not recognized - The structure for custom dataset should be based on one of the general observation classes (EVENTS, FINDINGS, INTERVENTIONS) defined by the SDTM model.
3.1.2
3.1.3
3.2
ALL
Dataset class not recognized for custom domain {data($domain)} in dataset {data($name)}. Only class FINDINGS, INTERVENTIONS or EVENTS is allowed but class {data($class)} was found ]]>