DESCRIPTION |
The APSV1 index allows to sort the XML reports on
that comprise different parts of the XML document.
2 "APSV", 2, 0, " ", 3)
2 "APSV", 2, 0, " ", 6)
5 "APSV", 2, 9, "DOU, JOHN", 3)
5 "APSV", 2, 9, "SMITH, BOB", 6)
6 "APSV", 2, 10, "1935/10/05", 6)
6 "APSV", 2, 10, "1950/03/25", 3)
3 "APSV", 3, 0, " ", 4)
3 "APSV", 3, 0, " ", 5)
4 "APSV", 6, 0, " ", 7)
4 "APSV", 6, 0, " ", 8)
Let us look more closely at the first entry of the
sub-index #5 (also see Table 1):
2 is the IEN of the REPORTS element in the
The index has the following structure:
REPORT ELEMENT multiple;
9 is the sorting mode (the IEN of the NAME
element in the ROR XML ELEMENT file);
"DOU, JOHN"
is the value of the NAME element;
3 is the IEN of the corresponding PATIENT
element in the REPORT ELEMENT multiple.
If the sort mode 9 (NAME) is used then the
resulting XML document will look like this:
<REPORT>
<PATIENTS>
<PATIENT>
<NAME>DOU, JOHN"</NAME>
<DOB>950/03/25</DOB>
</PATIENT>
^RORDATA(798.8,Task,"RI",
<PATIENT>
<NAME>SMITH, BOB</NAME>
<DOB>1935/10/05</DOB>
</PATIENT>
</PATIENTS>
</REPORT>
If the sort mode 10 (DOB) is used, the resulting
XML document will look as follow:
"APSV",List,Sort,ItemValue,ItemIEN) = ""
<REPORT>
<PATIENTS>
<PATIENT>
<NAME>SMITH, BOB</NAME>
<DOB>1935/10/05</DOB>
</PATIENT>
<PATIENT>
<NAME>DOU, JOHN"</NAME>
<DOB>950/03/25</DOB>
</PATIENT>
</PATIENTS>
</REPORT>
'Task' is the IEN of the main task record (it is
equal to the task number).
the server side.
'List' is the IEN of the list.
'Sort' is the sorting mode. It is the internal
value of the REPORT ELEMENT field (the IEN of the
XML element in the ROR XML ELEMENT file). Each
list can be sorted in different ways. The APSV0
index always uses 0 as the value of this
subscript.
'ItemValue' is the value of the list item. The
APSV0 index always uses " " as the value of this
subscript.
'ItemIEN' is the IEN of the list item.
To clarify, below is an example of some sample
content of the REPORT ELEMENT multiple:
IEN Element (int) Parent IEN Value
--- -------------- ---------- ------------
The APSV0 and APSV1 indexes work together and the
1 REPORT ( 1) 0
2 PATIENTS ( 3) 1
3 PATIENT ( 5) 2
4 NAME ( 9) 3 "DOU, JOHN"
5 DOB (10) 3 "1950/03/25"
6 PATIENT ( 5) 2
7 NAME ( 9) 6 "SMITH, BOB"
8 DOB (10) 6 "1935/10/05"
Table 1. Sample Report Elements
entries of both indexes are created under the same
The element names are indented to emphasize the
hierarchical structure of the document.
The numbers in parentheses after the element names
represent the internal values of the REPORT
ELEMENT field (the IENs in the ROR XML ELEMENT
file).
Several lists can be isolated from this example:
"APSV" subscript.
# List Items
--- ------- -------------------------------
1 REPORT PATIENTS
2 PATIENTS PATIENT, PATIENT
3 PATIENT NAME, DOB
4 PATIENT NAME, DOB
5 PATIENTS "DOU, JOHN", "SMITH, BOB"
6 PATIENTS "1935/10/05", "1950/03/25"
Table 2. The Lists
The first four lists contain just the report
elements themselves. They are used to render the
elements into XML tags in the same sequence as the
elements were created by the report builder. For
example, the <DOB> tag will always follow the
<NAME> tag.
The resulting index actually consists of several
The logic of the APSV0 index handles these
sub-indexes. They always have 0 as the sorting
mode and " " as the item value.
The last two sub-indexes are handled by the logic
of the "APSV1" index. As illustrated in the
example, the lists are associated with the
PATIENTS element, they comprise the PATIENT
elements, and are sorted by the values of the NAME
and DOB elements. Three levels of the hierarchy
sub-indexes (lists). Each index sorts the items
are covered by each of these sub-indexes.
Let us look at the corresponding index. The
numbers in the first column indicate the
corresponding lists from Table 2. The sub-indexes
are separated by empty lines:
# List Sort ItemValue ItemIEN
--- ---- ---- ------------- -------
1 "APSV", 1, 0, " ", 2)
|