Previous Topic

Next Topic

Book Contents

Loading error items into the INF_ERRORITEM table

You can attach queries to specific items by using the Resolve module CTV_CORE.SETUP_ERRORITEM PL/SQL procedure in a derivation to load records into the INF_ERRORITEM table. Specify every item that is relevant to the rule result; that is, specify all necessary rule dependencies.

These error items are ordered in the INF_ERRORITEM table, and the CIS software uses the order of the error items to determine the InForm item on which to place a query if the rule fails. For more information, see How CIS determines the item on which to place a query.

Use the following syntax.

CTV_CORE.SETUP_ERRORITEM(
‘rule-name’,
CTS$PANEL,
‘itemname’,
THIS.CT_RECID,
THIS.itemname,
NULL);

For example, the following derivation text, used with the AGE_CHECK rule, loads the VCT_ERRORITEM table (for PDC data) or the INF_ERRORITEM table (for EDC data) with records for the CONSDATE and BIRTHDATE items if the CHECK_AGE rule fails.

ctv_core.setup_erroritem(‘CHECK_AGE’,cts$panel,’CONSDATE’,
this.ct_recid,this.consdate,null);
ctv_core.setup_erroritem(‘CHECK_AGE’,cts$panel,’BIRTHDATE’,
this.ct_recid,this.birthdate,null);

If this.age <18 then
CHECK_AGE $msg :=’Age is less than 18’;
else CHECK_AGE$msg := null;
end if;

You can structure the derivation so that the only EDC item for which an error table record is written is the one on which you want the query to appear. For example, you can make sure that only the CONSDATE item has a record written to the INF_ERRORITEM table by using the IS_EDC_RECORD function.

ctv_core.setup_erroritem(‘CHECK_AGE’,cts$panel,’CONSDATE’,
this.ct_recid,this.consdate,null)
If not (
(IS_EDC_RECORD (CT_GLOBAL.CTS$PROTOCOL,
CT_GLOBAL.CTS$PANEL, CT_GLOBAL.CTS$CT_RECID))
ctv_core.setup_erroritem(‘CHECK_AGE’,cts$panel,’BIRTHDATE’,
this.ct_recid,this.birthdate,null);
end if;

In this version of the derivation, when the CONSDATE item tests true for being an EDC item, only the record for the CONSDATE item is written to the INF_ERRORITEM table, and therefore only the CONSDATE item is available for the InForm software to write the query on.

Send Feedback