OBJECT CODES

OBJECT CODES

An OBJECT CODE is a way of referencing properties of objects of the system.

SYNTAX

Objects can be nested, so it is possible to access subobject properties using a syntax like OBJECT.SUBOBJECT.PROPERTY

It is also possible to include some modifiers that allow more tailored references to objects. The complete syntax is (square brackets denote optional parameters)

       ROOT.SUBOBJECT[{SELECTOR}][:SCOPE].PROPERTY[{OPTION}][:PROPERTY_SCOPE]

  1. ROOT: MANDATORY. No all objects can act as a root node in the OBJECT CODE syntax. See OBJECT CODE NODES for more information

  2. SUBOBJECT{SELECTOR}:SCOPE. This block must appear at least once and can be repeated N times (nested subobjects)

    1. SUBOBJECT: MANDATORY. The name of a valid subobject. See OBJECT CODE NODES

    2. {SELECTOR}: OPTIONAL. Some nodes admit the possibility of specifying a selector to narrow the list of objects to which they can refer. Each type of object has its particular selectors. The name of the SELECTOR can have the following characters: letters A to Z, numbers 0 to 9, special characters: ". - _ #"

    3. :SCOPE: OPTIONAL. In some cases it is also possible to limit the scope of the referenced object. Normally the scope refers to a date range (see OBJECT CODES#SCOPE). Only some objects admit the SCOPE modifier, and each object accepts a different set of scope values..

  3. PROPERTY{OPTION}:PROPERTY_SCOPE

    1. PROPERTY: MANDATORY. determines the property for which we want to obtain the value. The range of properties is completely dependent of the object type. Take into account that a property can return a single value or an array (see RETURNED VALUES).

    2. {OPTION}: OPTIONAL. Some properties admit a modifier that allow to define which feature of the property must be returned. For example, when retrieving the value of an ITEM of type RADIO BUTTON, it is possible to obtain the literal description of the option selected (ITEM.ANSWER{DESC]), the value assigned to the option selected  (ITEM.ANSWER{VALUE}) or the order of the selected option in the list of available options ((ITEM.ANSWER{ORDER}). The name of the OPTION can have the following characters: letters A to Z, numbers 0 to 9, special characters: ". - _ #"

    3. :PROPERTY_SCOPE: OPTIONAL. Some properties can return multiple values instead of a single value. In those cases it is possible to specify a "property scope" to select only one or a subset of the returned values

EXECUTION CONTEXT

When any OBJECT CODE is evaluated, the WS-API sets a context that delimits where the affected objects requested can be found. For example, when the OBJECT CODE ITEM{n}.ANSWER is evaluated, the execution context will force to find the value only into the FORM where it is defined. This prevents retrieving information from other FORMS, TASKS, ADMISSIONS etc.

For extended information about the execution context, see "CONTEXT" OBJECT CODE .

RETURNED VALUES

The value that results from the evaluation of an object code can be of two types:

  1. Single (scalar) value: the OBJECT CODE refers to single object in the system which has a unique value. For example USER.GIVEN will return only one string with the name of the USER

  2. Array: In the following situations the return value will be an array

    1. When the OBJECT CODE refers to multiple objects in the system. In this case the array will contain the property value of each of the found objects. For example, TASK.FORM.NAME returns the names of all the FORMs of a TASK (if there were only one FORM, then a single value would be returned instead of an array)

    2. When the OBJECT CODE refers to a single object in the system, but the property is inherently multi-valued. For example FORM.ITEM.OPTIONS refers to the list of options of multi-option ITEMS (radio buttons, check boxes, CODE items...)

Language considerations

Those properties that admit localization will be returned in the active session language.

For example, in ITEMS of type CODE the internally stored value is a code which can have a description in multiple languages (see CODES WEB SERVICES). Then, when asking for the description ob such objects, the returned value will be translated to the corresponding language.

As a general rule of thumb, most of the literals in the SYSTEM OBJECTS and LIBRARY OBJECTS are language dependent.

OBJECT CODE NODES

The following table shows the available OBJECT CODE base objects, and states which of them can act as a root object or as a sub-object

CODE

ROOT

SUBOBJECT



CODE

ROOT

SUBOBJECT



https://linkcare.atlassian.net/wiki/spaces/WS/pages/2917105726

NO

YES

Introduced in API version 2.7.9

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2248540446

YES

YES

 

https://linkcare.atlassian.net/wiki/spaces/WS/pages/3811934210

YES

YES

 

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2917007457

YES

YES

Introduced in API version 2.6.20

"CHANNEL" OBJECT CODE

NO

YES

Introduced in API version 2.6.20

"COMMENTS" OBJECT CODE

NO

YES

Introduced in API version 2.7.24

"CONFIGURATION" OBJECT CODE

NO

YES

Introduced in API Version 2.7.22

"CONTACT" OBJECT CODE

NO

YES

 

"CONTEXT" OBJECT CODE

YES

NO

Introduced in API version 2.8.1

"DATA" OBJECT CODE

YES

YES

 

"DESCRIPTION" OBJECT CODE

NO

YES

Introduced in API version 2.7.10

"EVENT" OBJECT CODE

YES

NO

Introduced in API version 2.7.24

"@FORM" OBJECT CODE (FORM TEMPLATE)

YES

YES

Introduced in API Version 2.7.22

"FORM" OBJECT CODE

YES

YES



https://linkcare.atlassian.net/wiki/spaces/WS/pages/2249457847

NO

YES

Introduced in API version 2.6.20

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2248540390

NO

YES

Introduced in API version 2.6.20

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2932932939

YES

YES

Introduced in API Version 2.7.22

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2248540572

YES

YES

 

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2248540196

NO

YES

Introduced in API version 2.7.19

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2811101223

YES

NO

A program TEMPLATE. Also refers to a PROGRAM TEMPLATE associated with a SUBSCRIPTION

Introduced in API version 2.7.9

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2917007590

YES

YES

Introduced in API version 2.8.1

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2917007610

YES

YES

Introduced in API version 2.7.12

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2917007669

NO

YES

 

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2917007689

YES

NO

Introduced in API version 2.7.9

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2917007504

YES

NO

Introduced in API version 2.7.3

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2445574155

NO

YES

 

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2915926028

YES

YES

Introduced in API version 2.7.9

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2249457699

YES

NO

Introduced in API version 2.7.10

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2933031210

YES

NO

Introduced in API Version 2.7.22

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2249457894

YES

YES

 

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2917105755

YES

YES

 

https://linkcare.atlassian.net/wiki/spaces/WS/pages/2917105800

YES

YES

 





Related content