/
ITEM TYPE

ITEM TYPE

OVERVIEW

One of the most important properties of an ITEM is its type. The ITEM TYPE defines what kind of value will be stored (a string, number, list of options...)

Note that depending on the ITEM TYPE, some properties of the ITEM TEMPLATE OBJECT make sense while others do not.

The following table shows the different ITEM TYPES, which properties  ITEM TEMPLATE OBJECT make sense, and the possible values for them


ITEM TYPEITEM TEMPLATE PROPERTIES
CodeNameTITLESECTION_TITLELITERAL_FORMATARRANGEMENTMIN_LENMAX_LENMIN_VALMAX_VALVALUE_INTERVALDEF_VAL(*2)

FORMULA(*1)

MANDATORYHIDDEN(*7)CONDITIONEDVISIBILITY(*12)ARRAY_REFOPTIONSDEVICE_TYPEBARCODE_SCAN(*8)START_TIMEEND_TIMEPKPASS_FIELDSPKPASS_BACK_FIELDSNAV_MODEDISPLAY_TIME
1NUM

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/Anull| numnull| numN/Anull | num | {{data}} | formulanull | num | {{data}} | formulanull(N) | Y | Nnull(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnull N/A

N/A

N/AN/AN/AN/AN/AN/A
2BOOL

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/Anull | Y | N | formulanull | Y | N | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull(N) | Y | N | formulanull | numnull N/AN/AN/AN/AN/AN/AN/AN/A
3TXT

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesnull| numnull| numN/AN/AN/Anull | text | formulanull | text | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnull N/Anull (0) | 1 | 2N/AN/AN/AN/AN/AN/A
4TXT_AREA

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesnull | num | formulanull | num | formulaN/AN/AN/Anull | text | formulanull | text | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnull N/AN/AN/AN/AN/AN/AN/AN/A
5STATIC_TXT

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/Anull(N) | 1 | 0 | 2 | formulanull(N) | Y | N | formulanullnullN/Anull(N) | Y | N | formulanull | numN/AN/AN/AN/AN/AN/AN/AN/ANumber (of seconds) or FORMULA

COMBO_BOX

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/A

null | text | formula

(*8)

null | text | formulanull(N) | Y | Nnull(0) | 1 | 0 | 2
null(N) | Y | N | formula null(N) | Y | N | formulanull | numnull | formulaN/AN/AN/AN/AN/AN/AN/AN/A
7DATE

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/Anull | datenull | dateN/Anull | date | formulanull | date | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnullN/AN/AN/AN/AN/AN/AN/AN/A
8

TIME

 FORMULA  

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/Anull | time null | timeN/Anull | time | formulanull | time | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnull N/AN/AN/AN/AN/AN/AN/AN/A
9H_CHECK

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/A

null | num | formula

(*8)

null  | formula

(*8)

null(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnull | formulaN/AN/AN/AN/AN/AN/AN/AN/A
10V_CHECK

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/A

null | num | formula

(*8)

null  | formula

(*8)

null(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formula null(N) | Y | N | formulanull | numnull | formulaN/AN/AN/AN/AN/AN/AN/AN/A
11V_RADIO

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/A

null | num | formula

(*8)

null | formula

(*8)

null(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formula null(N) | Y | N | formulanull | numnull | formulaN/AN/AN/AN/AN/AN/AN/AN/A
13H_RADIO

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/A

null | num | formula

(*8)

null | formula

(*8)

null(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formula null(N) | Y | N | formulanull | numnull | formulaN/AN/AN/AN/AN/AN/AN/AN/A
14FORM (*10)

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/AN/Anull | text | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulaN/AnullN/AN/AN/AN/AN/AN/A

0: embedded

1: popup dialog

N/A
15CODE

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/Anull | text | formulanull | text | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | num

null | CODE OPTIONS

N/AN/AN/AN/AN/AN/AN/AN/A
16GRAPH

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesN/AN/AN/AN/AN/AN/AN/A

GRAPH ()

(*4)

N/Anull(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnullN/AN/AN/AN/AN/AN/AN/AN/A
17FILE (*5)

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format properties
N/AN/AN/AN/AN/Anull | mime_type | formula (***)null | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnullN/AN/AN/AN/AN/AN/AN/AN/A
18

ACTION

HIDDEN

Text | TWIG expression.

Can contain OBJECT CODES

N/AN/AN/AN/AN/AN/AN/AN/A

#OPEN | #CLOSE


null | formulaN/Anull(0) | 1 | 0 | 2null(N) | Y | N | formulaN/Anull | numnullN/AN/AN/AN/AN/AN/AN/AN/A
19LINK 

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/Anull | LINK() formulanull | LINK() formulaN/AN/A
null(N) | Y | N | formulanull(N) | Y | N | formulanull | num
N/AN/AN/AN/AN/AN/AN/AN/AN/A
20EDIT_STATIC_TXT

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/Anull | formulanull | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnullN/AN/AN/AN/AN/AN/AN/AN/A
21HTML (*6)

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/Anull | formulanull | formulaN/Anull(0) | 1 | 0 | 2null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnullN/AN/AN/AN/AN/AN/AN/AN/A
22JSON (*9)

Text | TWIG expression.

Can contain OBJECT CODES

N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
23DEVICE

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesN/AN/AN/AN/AN/AN/AN/AN/Anull(N) | Y | N
null(0) | 1 | 0 | 2null(N) | 1 | 0 | 2 | formulanull(N) | Y | N | formulaN/AN/A
  • SPIROMETER
  • PEDOMETER
  • PULSEOXYMETER
  • ACTIVITY_MONITOR
N/AN/AN/AN/AN/AN/AN/A
24AGE

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/AN/AN/Anull(N) | Y | Nnull(0) | 1 | 0 | 2null(N) | 1 | 0 | 2 | formulanull(N) | Y | N | formulaN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
25VAS (*11)

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/Anull | numnull | numnull | num | formulaN/AN/Anull(N) | Y | Nnull(0) | 1 | 0 | 2null(N) | 1 | 0 | 2 | formulanull(N) | Y | N | formulanull | numList of OPTIONSN/AN/AN/AN/AN/AN/AN/AN/A
26MULTIMEDIA

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/AN/AN/Anull(N) | Y | Nnull(0) | 1 | 0 | 2null(N) | 1 | 0 | 2 | formulanull(N) | Y | N | formulanull | numN/AN/AN/AN/AN/AN/AN/AN/AN/A
27GEOLOCATION

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/Anull | formulanull | formulaN/Anull(0) | 1 | 0 | 2null(N) | 1 | 0 | 2 | formulanull(N) | Y | N | formulaN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
28ATTACHMENT

Text | TWIG expression.

Can contain OBJECT CODES

N/AN/AN/AN/AN/AN/AN/AN/AN/Anull | formulaN/AN/Anull(N) | 1 | 0 | 2 | formulanull(N) | Y | N | formulanull | numN/AN/AN/AN/AN/AN/AN/AN/AN/A
29

CASE_DATA

Introduced in API version 2.7.14

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/AN/AN/Anull(N) | Y | Nnull(0) | 0 | 2null(N) | 1 | 0 | 2 | formulanull(N) | 1 | 0 | 2 | formulaN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
30

COUNTDOWN

Introduced in API version 2.7.16

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/AN/AN/AN/Anull(0) | 2null(N) | 1 | 0 | 2 | formulanull(N) | 1 | 0 | 2 | formulaN/AN/AN/AN/ADate |  formulaDate |  formulaN/AN/AN/AN/A
31QR

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesN/AN/AN/AN/AN/AN/AN/Anull | formulaN/Anull(0) | 1 | 0 | 2null(N) | 1 | 0 | 2 | formulanull(N) | 1 | 0 | 2 | formulanull | numN/AN/AN/AN/AN/AformulaformulaN/AN/A
32EVALUATION

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/Anull | text | formulanull | text | formulaN/Anull(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numN/AN/AN/AN/AN/AN/AN/AN/AN/A
33TRAINER (*10)

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/AN/Anull | text | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulaN/AnullN/AN/AN/AN/AN/AN/AN/AN/A
34

PHONE

Introduced in API version 2.7.22

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/Anull | text | formulanull | text | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnull N/AN/AN/AN/AN/AN/AN/AN/A
35

EMAIL

Introduced in API version 2.7.22

Text | TWIG expression.

Can contain OBJECT CODES

null(0) | 1 | 0null | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/Anull | text | formulanull | text | formulanull(N) | Y | N
null(0) | 1 | 0 | 2
null(N) | Y | N | formulanull(N) | Y | N | formulanull | numnull N/AN/AN/AN/AN/AN/AN/AN/A
36

ASSOCIATE

Introduced in API version 2.7.23

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/AN/AN/Anull(N) | Y | Nnull(0) | 0 | 2null(N) | 1 | 0 | 2 | formulanull(N) | 1 | 0 | 2 | formulaN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
37

ARRAY

Introduced in API version 2.7.23

Text | TWIG expression.

Can contain OBJECT CODES

N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
38

SIGNATURE

Introduced in API version 2.7.25

Text | TWIG expression.

Can contain OBJECT CODES

N/Anull | JSON with format propertiesnull | JSON with format propertiesN/AN/AN/AN/AN/AN/Anull | text | formulanull(N) | Y | Nnull(0) | 1 | 0 | 2null(N) | Y | N | formulanull(N) | Y | N | formulaN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A


(*1) Any ITEM with a FORMULA property other than null cannot be edited. The formula sentence is calculated at form open and each time referred an ITEM value is changed

(*2) If an ITEM's DEF_VAL property may be defined by a default value or formula, the field will have a predefined value. But the actual ITEM value can be edited by the user. The DEF_VALUE property is ignored if the FORMULA property is not null. If default has the suffix "?set(true)" means that the value will already be informed the first time the form is opened, so the value will retain the 

The default value is only generated on form open and is not possible to recalculate, therefore, if a form B which contains a formula "DATA_CODE" that exists in form A, If by any chance the form B is opened before A is closed, the information containing the formula DATA_CODE will never be updated.

(*3) FILE formulas only allow to return a mime type

(*4) The formula must be GRAPH_SPIRO() or GRAPH_EVOLUTION()

(*5) To filter the files we need to decide were to place the valid extensions. If a FILE ITEM has the DATA_CODE = "FILE.SPIRO.PBD" or "FILE.SPIRO.BAS" the file is considered a spirometry.

(*6) The HTML stored in the ANSWER VALUE will be show as the ITEM's DESCRIPTION in browse mode form_get_summary () and cannot be edited

(*7) HIDDEN property indicates whether n ITEM should be displayed. This property affects the behavior of form_get_summary (), which will only return the ITEM if this property states that it is not hidden. There are 4 possible values:

  • NULL / 0: The ITEM is always visible
  • 1: The ITEM is always hidden
  • 2: The ITEM is visible if the FORM has been closed
  • 3: The ITEM is visible if the FORM is still open

(*8) In choice objects such as  V_CHECK, H_CHECK, H_RADIO, V_RADIO and COMBO "default value" or "formula" will determine the "Order of option" of the option that should be selected by default. Only V_CHECK and H_CHECK accepts several values as "default" (separated by "|").

(*9) JSON type is internal and used for creating questions and building templates 

(*10) FORM type is used to represent the summary of an existing FORM (defined by a FORM_CODE that is stored in the ITEM's DATA_CODE property). If multiple FORMs with the same FORM_CODE exist, the most recent will be used to show the summary

(*11) VAS stands for "Variable Analog Scale", which a value represented graphically as a slider and which can take values between a minimum and maximum value. The value can be incremented by a predefined 'VALUE INCREMENT' amount. For example, the temperature of a patient may be a number between 32º and 43º, and can be incremented in steps of 0.1º

(*12) VISIBILITY allows to enter a value or formula to control if this item is visible. This property is different from "CONDITIONED", because a conditioned question don't exists if the condition is "false" (there may be several ITEMS with the same DATA_CODE and some of the exists or not). The visibility only affects if the item is shown to the user. One possible application of visibility is to use the formula "SESSION.ROLE.REF = 39" (this will only show the question to a user with role "Patient"). In the VISIBILITY property the value "null" is interpreted as "true".

(*13) BARCODE_SCAN: This property is used to indicate that it may be possible for the user to enter the value of the ITEM by scanning a barcode. This is only a suggestion for the client APP because the API has no control on the way the items are presented to the user. Accepted values for this property are:

  • NULL / 0: Do not allow barcode scan
  • 1: Allow barcode scan and manual input
  • 2: Allow only barcode scan


Related content