dms.GetResultList
Searches for DMS objects that match the request. The specification of target objects and fields is done via an DMSQuery XML request document, which can use OS names, internal names, GUIDs, and database names.
General request properties can be set both as job parameters and as XML attributes in the root element of the XML request — XML attributes have priority.
The internal_name attribute of the <Archive> element
is only required for cross-archive queries (multiple <Archive> elements) — provided that
the contained <ObjectType> elements also use internal_name.
In single-archive queries, the attribute can be omitted.
|
1. Input Parameters
| Name | Type | Required | Description |
|---|---|---|---|
|
INT |
Yes |
Controls the output format. |
|
BASE64 |
Yes |
Request in XML format (see Detailed Description). |
|
STRING |
No |
Encoding of the result document. |
|
INT |
No |
Offset for the first returned record. Default: |
|
INT |
No |
Number of records to return. |
|
INT |
No |
Maximum hit count per object type. |
|
INT |
No |
|
|
INT |
No |
|
|
INT |
No |
|
|
STRING |
No |
Formatting of returned date values |
|
INT |
No |
|
|
STRING |
No |
Request type: |
|
STRING |
No |
Output format depending on request type: |
|
STRING |
No |
Delimiter between values in a linear list as a simple text file. |
|
INT |
No |
|
|
STRING |
No |
Standard field schema for all object types of the request. |
|
INT |
No |
|
|
INT |
No |
|
|
INT |
No |
|
|
INT |
No |
|
|
INT |
No |
|
|
INT |
No |
|
|
INT |
No |
Automatic appending of |
|
INT |
No |
Language code for DMS names in the request. Default: |
|
STRING |
No |
Locale (e.g. |
|
INT |
No |
Language code for DMS names in the result document. Default: |
|
STRING |
No |
Locale (e.g. |
|
INT |
No |
|
|
STRING |
No |
User context for job execution |
|
INT |
No |
|
|
INT |
No |
|
2. Output Parameters
| Name | Type | Dependency | Description |
|---|---|---|---|
|
INT |
— |
Number of returned records. |
|
INT |
— |
Total number of available hits. |
|
INT |
Optional |
Number of returned files (always |
|
BASE64 |
If |
Hit list in XML format as buffer. |
3. Output Files
| Name | Description |
|---|---|
|
Path and name of the XML file with the hit list. |
4. Return Value
(INT): 0 = Job successful, otherwise error code
Complete error list
5. Detailed Description
A request essentially consists of defining the requested DMS object, selecting the fields to be returned, and setting search conditions. Additionally, location information can be requested, full-text or base parameter searches performed, links to objects from other cabinets created, or requests parameterized.
5.1. Request Types
In search requests, linear and hierarchical requests are generally distinguished. Detail requests represent a special case.
5.1.1. Linear Requests / Linear Object Lists (LOL)
Linear requests can request simple index data of objects of a certain type. Table controls and multi-parameter fields are excluded from this.
When requesting documents or registers, fields of the direct parent register and folder can also be requested.
5.1.2. Hierarchical Requests / Hierarchical Object Lists (HOL)
Hierarchical requests can not only return the content of table controls and multi-parameter fields, but also child elements — for example, registers and documents within the requested folder. Additionally, object properties such as document variants, access rights and notes can be requested.
In contrast to linear requests, for hierarchical requests at least one additional database query must be performed for each hit. Each requested object property increases this number.
5.2. Result Formats
The XML format for request results follows the DMSContent XML format.
It always starts with the <DMSContent> element, which indicates the type (LOL, HOL or MIXED) via the format attribute.
5.2.1. Linear Object List (LOL)
Linear object lists are initiated by the <Rowset> element. They have a
tabular structure with a header (<Columns>) and hit rows (<Rows>).
5.2.2. Hierarchical Object List (HOL)
Hierarchical hit lists are initiated by the <ObjectList> element.
For each hit object, field definitions and field values are written.
The <ChildObjects> element can represent arbitrary hierarchy depths.
<ObjectList>
<ObjectType name="Admission" id="196616" type="REGISTER" table="object12">
<Object id="3226">
<Fields>
<Field name="Case Number" datatype="TEXT" dbname="feld62" ostype="X" size="20">987654</Field>
<Field name="Start" datatype="DATE" dbname="datum1" ostype="D" size="10">01.10.2003</Field>
<Field name="End" datatype="DATE" dbname="datum2" ostype="D" size="10"/>
</Fields>
<ChildObjects>
<!-- Document type 'Medical Letter' -->
<ObjectType name="Medical Letter" id="262273" type="DOCUMENT" modul="WINDOWS" table="object162">
<ObjectList>
<Object id="37744">
<Fields>
<Field name="Date" datatype="DATE" dbname="datum1" ostype="D" size="10">12.11.2003</Field>
<Field name="Physician" datatype="TEXT" dbname="feld1" ostype="X" size="50">DEMO</Field>
<Field name="Type" datatype="TEXT" dbname="feld3" ostype="X" size="20">Surgical Medical Letter</Field>
<Field name="Status" datatype="INTEGER" dbname="zahl2" ostype="9" size="1"/>
</Fields>
</Object>
</ObjectList>
<Statistics startpos="0" pagesize="5" total_hits="1"/>
</ObjectType>
</ChildObjects>
</Object>
</ObjectType>
<Messages/>
</ObjectList>
5.2.3. Displaying Field Values
Generally, field values are output as XML element text. For certain field types
(time, timestamp, option buttons, system field Owner, trees, multilingual catalogs)
the database value is output as a value attribute and the display text as element text.
Example LOL: <Value value="M">male</Value>
Example HOL:
<Field value="M" name="Gender" datatype="TEXT" dbname="feld7" ostype="X" size="1">male</Field>
5.2.4. The <Statistics> Element
At the end of each hit list, the <Statistics> element provides information about the result scope:
<Statistics startpos="20" pagesize="20" total_hits="50"/>
5.3. General Request Behavior
In a search request, search conditions can be formulated for one or more object types — for example, for both registers and folders in a document request.
This behavior is controlled by the RegisterContext parameter:
-
1(Default) — Register conditions are taken into account. -
0— Register clauses are ignored; only objects in registers are requested (HOL).
5.4. Creating Requests
First, the DMS objects and fields to be requested must be defined. Objects and fields can be identified by:
-
name— speaking OS name -
internal_name— internal name -
osguid— OSGUID -
table/dbname— database table or column name
5.4.1. Simple Example
Request all folders of the cabinet Patient with all index data.
The type attribute (FOLDER, REGISTER, DOCUMENT) avoids name conflicts between
similarly named object types.
<?xml version="1.0" encoding="UTF-8"?>
<DMSQuery>
<Archive internal_name="patient">
<ObjectType internal_name="patient_folder" type="FOLDER">
<Fields field_schema="ALL"/>
</ObjectType>
</Archive>
</DMSQuery>
5.4.2. Define Fields Explicitly
If not all index data is needed, set field_schema="DEF" and list the desired fields individually:
<Fields field_schema="DEF">
<Field internal_name="firstname"/>
<Field internal_name="postal_code_city"/>
<Field internal_name="city"/>
</Fields>
5.4.3. System Fields
System fields are requested with the system="1" attribute and specified by internal name,
GUID or database field name.
A complete overview of all available system fields is provided in System Fields.
<Archive internal_name="patient">
<ObjectType internal_name="images" type="DOCUMENT">
<Fields field_schema="ALL">
<Field internal_name="OBJECT_COUNT" system="1"/>
</Fields>
</ObjectType>
</Archive>
5.4.4. Sorting
Sorting via the sortpos attribute (priority, value > 0) and sortorder (ASC / DESC).
Fields with lower sortpos have higher priority.
<?xml version="1.0" encoding="UTF-8"?>
<DMSQuery>
<Archive internal_name="patient">
<ObjectType internal_name="admission" type="REGISTER">
<Fields field_schema="ALL">
<Field internal_name="author" sortpos="1" sortorder="ASC"/>
<Field internal_name="date" sortpos="2" sortorder="DESC"/>
</Fields>
</ObjectType>
</Archive>
</DMSQuery>
5.5. Search Conditions
Conditions can be formulated for the requested object as well as parent and child objects.
The <ConditionObject> attribute determines for which object the conditions apply.
5.5.1. Combined Queries Across Multiple Object Types
Conditions can simultaneously reference fields of different object types within the same cabinet. The server returns only those objects for which all conditions are satisfied — regardless of which object type a particular condition refers to.
The following combinations are supported:
-
Searching for a document with conditions on fields of the document itself, its register, and its folder.
-
Searching for a register or folder that contains a child object matching a specific condition.
| For nested registers, only the immediately superior register is available as a condition target — its parent registers cannot be referenced. |
Variant 1 — Searching for child objects based on parent object criteria
Retrieve all body measurements (body_measurements) that are stored in an admission register for the Cardiology ward and where the patient’s height exceeds 180 cm. The requested object is the document; the condition on the register restricts the search space to admissions in the desired ward.
<?xml version="1.0" encoding="UTF-8"?>
<DMSQuery>
<Archive internal_name="patient">
<ObjectType internal_name="body_measurements" type="DOCUMENT">
<Fields field_schema="DEF">
<Field internal_name="body_height_cm"/>
<Field internal_name="body_weight_kg"/>
</Fields>
<Conditions>
<ConditionObject internal_name="admission" type="REGISTER">
<FieldCondition internal_name="ward" operator="=">
<Value>Cardiology</Value>
</FieldCondition>
</ConditionObject>
<ConditionObject internal_name="body_measurements" type="DOCUMENT">
<FieldCondition internal_name="body_height_cm" operator=">">
<Value>180</Value>
</FieldCondition>
</ConditionObject>
</Conditions>
</ObjectType>
</Archive>
</DMSQuery>
Variant 2 — Searching for parent objects based on child object criteria
Retrieve all admissions (admission) that contain at least one body measurement with a height greater than 180 cm. The requested object is the register; the condition references a subordinate document.
<?xml version="1.0" encoding="UTF-8"?>
<DMSQuery>
<Archive internal_name="patient">
<ObjectType internal_name="admission" type="REGISTER">
<Fields field_schema="DEF">
<Field internal_name="ward"/>
<Field internal_name="start_date"/>
</Fields>
<Conditions>
<ConditionObject internal_name="body_measurements" type="DOCUMENT">
<FieldCondition internal_name="body_height_cm" operator=">">
<Value>180</Value>
</FieldCondition>
</ConditionObject>
</Conditions>
</ObjectType>
</Archive>
</DMSQuery>
5.5.2. Comparison Operators
| Operator | XML-conforming format |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5.5.3. Wildcards (Text Fields)
| Wildcard | Meaning |
|---|---|
|
Any character sequence |
|
Single character |
|
Phonetic search (only MSSQL and Oracle) |
Escape character: Backslash — \? searches for a question mark.
LIKE operator is used automatically if wildcards are present.
5.5.5. Date
Date values can be passed in all common formats. Two-digit years: xy < 50 → 20xy, xy ≥ 50 → 19xy.
For incomplete date values with the equality operator, search is performed within the corresponding time range:
-
=1999→BETWEEN 1.1.1999 AND 31.12.1999 -
!= 1999→NOT BETWEEN 1.1.1999 AND 31.12.1999
If two <Value> elements are specified, BETWEEN is used automatically.
5.5.6. Search Conditions for Table Fields
<DMSQuery>
<Archive internal_name="test_cabinet">
<ObjectType internal_name="windoc">
<Fields field_schema="ALL"/>
<Conditions>
<ConditionObject internal_name="windoc">
<TableCondition name="MyTable">
<TableColumn name="1.Column" operator="=">
<Value>11</Value>
</TableColumn>
</TableCondition>
</ConditionObject>
</Conditions>
</ObjectType>
</Archive>
</DMSQuery>
5.5.7. Boolean Connections (AND / OR)
By default, conditions are connected with AND. For OR connections, field conditions
are grouped under <FieldGroup operator="OR">. Nesting is possible.
<Conditions>
<ConditionObject internal_name="press_archive">
<FieldGroup operator="OR">
<FieldCondition internal_name="subject_area">
<Value>Technology</Value>
</FieldCondition>
<FieldCondition internal_name="created_by">
<Value>Smith</Value>
</FieldCondition>
</FieldGroup>
<Created>
<From>1.1.2002</From>
<To>31.12.2003</To>
</Created>
</ConditionObject>
</Conditions>
Multiple <ConditionObject> elements for the same object type are connected with OR.
5.5.8. Base Parameter Search Conditions
| XML Element | Meaning |
|---|---|
|
Creator |
|
Creation date |
|
Last modifier |
|
Date of last change (two values → range) |
|
Username of owner |
|
Archiving status (documents only): |
|
Checkout status (documents only): |
5.5.9. OBJECT_SEARCHFLAGS
Base parameter properties of documents as search condition:
<Conditions>
<ConditionObject internal_name="document1" type="DOCUMENT">
<FieldCondition internal_name="OBJECT_SEARCHFLAGS" system="1">
<Value>68</Value>
</FieldCondition>
</ConditionObject>
</Conditions>
Values are combined bitwise: Value 68 = IN_REGISTER (64) AND NOT_ARCHIVABLE (4).
-
Values of the same group → logically OR
-
Values of different groups → logically AND
| Constant | Hex | Decimal | Description |
|---|---|---|---|
|
|
1 |
Document is archived |
|
|
2 |
Document is released for archiving |
|
|
4 |
Document is not released for archiving |
|
|
8 |
Document has no pages |
|
|
16 |
Document is checked out by current user |
|
|
32 |
Document is checked out by another user |
|
|
64 |
Document is in a register |
|
|
128 |
Document is not in a register (directly on folder level) |
|
|
256 |
Document is an external document |
|
|
512 |
Document is a document link |
|
|
1024 |
Document is located at multiple places |
|
|
2048 |
Document has variants |
|
|
4096 |
Current version of the document is signed |
|
|
8192 |
A former version of the document is signed |
5.5.10. Full-text Conditions
Through <Fulltext>, a full-text search is performed. The optional attribute
query_catalogue_locale sets the language for multilingual catalogs.
5.5.11. Request Parameterization
Parameters are defined below <DMSQuery> and referenced in conditions via the
ref attribute in the <ParamValue> element:
<DMSQuery>
<Params>
<Param name="PatID">3987</Param>
</Params>
<Archive internal_name="patient">
<ObjectType internal_name="patient_folder">
<Fields field_schema="ALL"/>
<Conditions>
<ConditionObject internal_name="patient_folder">
<FieldCondition internal_name="patient_id">
<ParamValue ref="PatID"/>
</FieldCondition>
</ConditionObject>
</Conditions>
</ObjectType>
</Archive>
</DMSQuery>
5.5.12. Cross-Cabinet Requests
Via <ExternalObjects>, information from another cabinet can be linked in HOL requests.
The linking is done via a link_name attribute on the outgoing field and a
<LinkedValue ref="…"/> reference in the external object:
<DMSQuery>
<Archive internal_name="press_archive">
<ObjectType internal_name="bw_scans">
<Fields>
<Field internal_name="document_type"/>
<Field internal_name="author" link_name="author"/>
<Field internal_name="date"/>
</Fields>
<ExternalObjects>
<ExternalArchive internal_name="addresses">
<ExternalObjectType internal_name="addresses">
<Fields field_schema="ALL"/>
<SubConditions>
<FieldCondition internal_name="last_name">
<LinkedValue ref="author"/>
</FieldCondition>
</SubConditions>
</ExternalObjectType>
</ExternalArchive>
</ExternalObjects>
</ObjectType>
</Archive>
</DMSQuery>
5.5.13. Location Information
<ParentObjects> is an HOL-exclusive element. It delivers the complete object path
(folder, register) to the hit object.
In LOL requests, parent fields are not available via <ParentObjects> —
fields of the direct parent register and folder can be included directly in the <Fields> list
and appear in the hit row.
<ParentObjects> supports the attributes:
-
parent_schema— which parent types are returned; default:DEF
Valid values: object_schema (DEF,ALL,REGISTER,DOCUMENTS) -
field_schema— standard field selection for all parent objects
Valid values: field_schema (DEF,ALL,ALLREL,MIN)
Child elements:
-
<ParentObjectType>— one or more explicitly desired parent types -
<SubObjectType>— the requested target object in the path (type and internal name)
<DMSQuery requesttype="HOL">
<Archive internal_name="patient">
<ObjectType internal_name="medical_letter" type="DOCUMENT">
<Fields field_schema="DEF">
<Field internal_name="date"/>
<Field internal_name="physician"/>
</Fields>
<ParentObjects parent_schema="DEF">
<SubObjectType internal_name="medical_letter" type="DOCUMENT"/>
</ParentObjects>
</ObjectType>
</Archive>
</DMSQuery>
5.5.14. Exporting Hierarchical Structures (HOL)
<ChildObjects> is an HOL-exclusive element. It determines which child objects
are delivered hierarchically.
Attributes:
-
child_schema— which child types are returned; default:DEF
Valid values: object_schema (DEF,ALL,REGISTER,DOCUMENTS) -
export_depth— depth of hierarchy (0= direct children,1= children and grandchildren etc.); default:0 -
field_schema— standard field selection for all child types
Valid values: field_schema (DEF,ALL,ALLREL,MIN)
Child elements of <ChildObjects>:
-
<ChildObjectType>— one element per requested child type; carries the same identification attributes as<ObjectType>plus:-
alias— alias name for similarly named types in the hit list -
<Fields>— desired fields of the child type -
<SubConditions>— additional filter conditions for child objects -
<ExternalObjects>— linked foreign archive objects of the children
-
<DMSQuery requesttype="HOL">
<Archive internal_name="patient">
<ObjectType internal_name="admission" type="REGISTER">
<Fields field_schema="DEF">
<Field internal_name="case_number"/>
<Field internal_name="admission_date"/>
</Fields>
<ChildObjects child_schema="DEF" export_depth="0">
<ChildObjectType internal_name="medical_letter" type="DOCUMENT">
<Fields field_schema="DEF">
<Field internal_name="date"/>
<Field internal_name="physician"/>
</Fields>
</ChildObjectType>
</ChildObjects>
</ObjectType>
</Archive>
</DMSQuery>
5.5.15. Full-text Searches
<?xml version="1.0" encoding="UTF-8"?>
<DMSQuery>
<Archive internal_name="patient">
<FulltextQuery>
<ChildObjects child_schema="DEF">
<ChildObjectType internal_name="medical_letter">
<Fields>
<Field internal_name="date"/>
<Field internal_name="senior_physician"/>
<Field internal_name="type"/>
</Fields>
</ChildObjectType>
<ChildObjectType internal_name="diagnosis">
<Fields field_schema="ALL"/>
</ChildObjectType>
</ChildObjects>
<Fulltext>Meningitis</Fulltext>
</FulltextQuery>
</Archive>
</DMSQuery>
5.5.16. Multiple Requests in One Document
<DMSQuery>
<Archive internal_name="addresses">
<ObjectType internal_name="addresses">
...
</ObjectType>
</Archive>
<Archive internal_name="patient">
<ObjectType internal_name="color_images" alias="F2">...</ObjectType>
<ObjectType internal_name="grayscale_images" alias="G1">...</ObjectType>
<ObjectType internal_name="color_images" alias="F1">...</ObjectType>
</Archive>
</DMSQuery>
The optional alias attribute in the <ObjectType> element enables targeted access to
results of similarly named object types in the hit list.
5.6. Paging Through Hit Lists
With PageSize (page size), Offset (start position) and MaxHits (hit upper limit),
hit lists can be retrieved page by page. The <Statistics> element at the end of each
hit list provides information about the scope:
<Statistics startpos="20" pagesize="20" total_hits="50"/>
Example: PageSize=20, MaxHits=101, actually 120 hits:
| Page | Input | <Statistics> output |
|---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
After page 1: (101-1) / 20 = 5 pages. Since total_hits=101 > MaxHits-1=100,
there are further hits beyond the upper limit.
5.7. Base Parameters
With baseparams=1, in addition to index data, all base parameters are delivered.
In HOL they appear in a separate <BaseParams> group:
For all object types: creator, creation date, modifier, modification date, owner
(name as text, GUID as osguid attribute).
For documents additionally: check-in/check-out status, archiving status, retention periods.
<BaseParams>
<Creator>love</Creator>
<Created>12.12.2003</Created>
<Modifier>root</Modifier>
<Modified>14.12.2003</Modified>
<Owner guid="BC1123CDFAAAS">love</Owner>
<ArchiveState>ARCHIVABLE</ArchiveState>
<Locked>SELF</Locked>
</BaseParams>
5.8. Object Status
With status=1 in the <DMSQuery> element, the following status information is determined for each object:
-
Links
For documents additionally:
-
Module type
-
Archiving status
-
Checked in / Checked out
-
Number of pages
-
Number of real document pages (system field OBJECT_DOCPAGECOUNT)
5.9. Rights
With rights=1 in the <DMSQuery> element, the access rights of the requesting
user are determined for each object:
| Attribute | Description |
|---|---|
|
User may change index data |
|
User may delete the object |
|
User may open or export the object |
|
User may edit the object |
Example: <Rights modify_index="1" delete_object="1" export_object="1" modify_object="1"/>
With ObjectInserts=1, the insertable instances for each possible child object type are determined:
<Rights object_inserts="1" modify_index="1" delete_object="1" export_object="1" modify_object="1">
<ObjectInserts type="65536" count="-1"/>
<ObjectInserts type="131108" count="-1"/>
<ObjectInserts type="131119" count="0"/>
<ObjectInserts type="196608" count="-1"/>
<ObjectInserts type="262144" count="-1"/>
</Rights>
count="-1" means no restriction. If rights=1 was not set, all
right attributes are set to -1.
5.10. File Information
With fileinfo=1, for each document the following properties are written as attributes in <FileProperties>:
| Attribute | Description |
|---|---|
|
Number of files |
|
Document size in bytes |
|
File type standard extension |
|
MIME type |
|
MIME type group (e.g. |
|
ID of the linked object (if |
|
Type ID of the linked object (if |
|
Number of document pages (if known) |
The attributes extension, mimetype and mimetypegroup are not available for LOL queries and are only returned for HOL queries.
|
Example: <FileProperties count="1" size="179489" extension="jpg" mimetype="image/jpeg"/>
5.11. Notes
With the <DMSQuery> attribute remarks="1", notes and note links
are returned for each requested document (HOL only):
| Attribute / Element | Description |
|---|---|
|
ID of the note |
|
Note type: |
|
|
|
Medium ID (work directory) or |
|
Creator name (ID as attribute) |
|
Creation date (timestamp as attribute) |
|
Last modifier (ID as attribute) |
|
Date of last modification (timestamp as attribute) |
|
Note text (ID as attribute; empty for object note) |
<Object id="81">
<Remarks>
<Remark id="1413" type="1" relation="0" medium="4">
<Creator id="16">SMITH</Creator>
<Created value="1143560855">28.03.2006 17:47:35</Created>
<Modifier id="18">JONES</Modifier>
<Modified value="1946463756">30.04.2006 14:50:12</Modified>
<Text>Note text</Text>
</Remark>
</Remarks>
</Object>
5.12. Language Settings
Through lang_id or query_language, the language for field and object names in the
request can be set.
For multilingual catalogs, QueryCatalogueLocale (job parameter),
query_catalogue_locale (XML attribute at root or field) is available.
The field-specific locale overrides the global setting.
| A multilingual catalog cannot be requested with different locales within a single request. |
5.13. Icons
With icons="1" in the <DMSQuery> element, icon IDs of all custom icons
are returned. The iconid attribute is attached to <Object> (HOL only; icons="1" is ignored for LOL queries).
Image files for an icon ID can be retrieved via cnv.GetIcons.
5.14. Document Variants
With variants="1" in the <DMSQuery> element, for W-documents the variant tree
is output via <DocumentVariant> and <DocumentVariants> elements
(without index data).
| Attribute | Meaning |
|---|---|
|
|
|
Document ID of this variant |
|
Version identifier |
|
ID of the original variant (may also contain ID of deleted documents) |
| For searches of W-documents, always the active variant is returned. |
6. Related Jobs
-
dms.GetObjectDetails — Returns index data of a single object; uses the same DMSContent HOL format and same output parameters
-
dms.GetDeletedObjects — Search for deleted objects with identical DMSQuery format
-
dms.ConvertQuery — Converts a DMSQuery between different identifier formats (Name, internal name, GUID, DB-name)
-
dms.AddStoredQuery — Create stored search request
-
dms.GetStoredQuery — Retrieve stored search request
-
dms.ExecuteStoredQuery — Execute stored search request
-
dms.UpdateStoredQuery — Update stored search request
-
dms.RemoveStoredQuery — Delete stored search request