Previous Topic

Next Topic

Book Contents

Writing a client program to evaluate ItemData elements

To evaluate the ItemData information for each InForm item, your program must find the root ItemDef elements (root controls) for each InForm item, and recursively process them and their child ItemDef elements (child controls) to determine the completeness of each InForm item. Match the ItemDef elements from metadata (from DownloadMetadataODM) to the corresponding ItemData elements from clinical data (from GetTransactions) to get the values of the controls.

To identify the ItemDefs of an InForm item:

An InForm item is represented in metadata by a pf:InFormItemDef element. Each pf:InFormItemDef has a list of ItemRefs, which represent all of the controls associated with the InForm item. The ItemRefs have corresponding ItemDefs.

To find the root ItemDefs of an InForm item:

To find the child ItemDefs of an ItemDef:

  1. If the ItemDef has pf:ControlType of "RadioGroup," then find the child ItemDefs whose pf:ParentOID match the pf:SelectionOID of the RadioGroup’s selected CodeListItem.  The Clinical Data will determine which CodeListItem is selected from the RadioGroup.
  2. For ItemDefs that have other pf:ControlType values, find the child ItemDef whose pf:ParentOID matches the ItemDef’s OID.

Calculated controls:

Calculated controls are treated specially when determining completeness. When an item contains only a single calculated control, the item is considered complete, even if the calculated control has no value. Also, if a checkbox or radio group selection contains only a calculated control, that selection is considered to be complete. Otherwise, calculated controls are ignored.

An item is complete if:

Note: Empty is not the same as Incomplete. A radio group or checkbox group is incomplete if it has a selection, and the selection's child control(s) are empty or incomplete.

Send Feedback