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 TYPE | ITEM TEMPLATE PROPERTIES | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Code | Name | TITLE | SECTION_TITLE | LITERAL_FORMAT | ARRANGEMENT | MIN_LEN | MAX_LEN | MIN_VAL | MAX_VAL | VALUE_INTERVAL | DEF_VAL(*2) | FORMULA(*1) | MANDATORY | HIDDEN(*7) | CONDITIONED | VISIBILITY(*12) | ARRAY_REF | OPTIONS | DEVICE_TYPE | BARCODE_SCAN(*8) | START_TIME | END_TIME | PKPASS_FIELDS | PKPASS_BACK_FIELDS | NAV_MODE | DISPLAY_TIME |
1 | NUM | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | null| num | null| num | N/A | null | num | {{data}} | formula | null | num | {{data}} | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
2 | BOOL | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | Y | N | formula | null | Y | N | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formulanull(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
3 | TXT | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | null| num | null| num | N/A | N/A | N/A | null | text | formula | null | text | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | null (0) | 1 | 2 | N/A | N/A | N/A | N/A | N/A | N/A |
4 | TXT_AREA | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | null | num | formula | null | num | formula | N/A | N/A | N/A | null | text | formula | null | text | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
5 | STATIC_TXT | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null(N) | 1 | 0 | 2 | formula | null(N) | Y | N | formula | null | null | N/A | null(N) | Y | N | formula | null | num | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | Number (of seconds) or FORMULA |
COMBO_BOX | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | text | formula (*8) | null | text | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | formula | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | |
7 | DATE | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | null | date | null | date | N/A | null | date | formula | null | date | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
TIME
| Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | null | time | null | time | N/A | null | time | formula | null | time | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | |
9 | H_CHECK | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/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 | formula | null | num | null | formula | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
10 | V_CHECK | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/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 | formula | null | num | null | formula | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
11 | V_RADIO | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/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 | formula | null | num | null | formula | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
13 | H_RADIO | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/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 | formula | null | num | null | formula | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
14 | FORM (*10) | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | null | text | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | N/A | null | N/A | N/A | N/A | N/A | N/A | N/A | 0: embedded 1: popup dialog | N/A |
15 | CODE | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | text | formula | null | text | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | CODE OPTIONS | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
16 | GRAPH | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | N/A | GRAPH () (*4) | N/A | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
17 | FILE (*5) | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | mime_type | formula (***) | null | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | |
18 | ACTION
| Text | TWIG expression. Can contain OBJECT CODES | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | #OPEN | #CLOSE | null | formula | N/A | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | N/A | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
19 | LINK | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | LINK() formula | null | LINK() formula | N/A | N/A | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
20 | EDIT_STATIC_TXT | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | formula | null | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
21 | HTML (*6) | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | formula | null | formula | N/A | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
22 | JSON (*9) | Text | TWIG expression. Can contain OBJECT CODES | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
23 | DEVICE | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | 1 | 0 | 2 | formula | null(N) | Y | N | formula | N/A | N/A |
| N/A | N/A | N/A | N/A | N/A | N/A | N/A |
24 | AGE | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | N/A | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | 1 | 0 | 2 | formula | null(N) | Y | N | formula | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
25 | VAS (*11) | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | null | num | null | num | null | num | formula | N/A | N/A | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | 1 | 0 | 2 | formula | null(N) | Y | N | formula | null | num | List of OPTIONS | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
26 | MULTIMEDIA | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | N/A | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | 1 | 0 | 2 | formula | null(N) | Y | N | formula | null | num | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
27 | GEOLOCATION | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | formula | null | formula | N/A | null(0) | 1 | 0 | 2 | null(N) | 1 | 0 | 2 | formula | null(N) | Y | N | formula | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
28 | ATTACHMENT | Text | TWIG expression. Can contain OBJECT CODES | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | null | formula | N/A | N/A | null(N) | 1 | 0 | 2 | formula | null(N) | Y | N | formula | null | num | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
29 | Introduced in API version 2.7.14 | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | N/A | null(N) | Y | N | null(0) | 0 | 2 | null(N) | 1 | 0 | 2 | formula | null(N) | 1 | 0 | 2 | formula | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
30 | Introduced in API version 2.7.16 | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | null(0) | 2 | null(N) | 1 | 0 | 2 | formula | null(N) | 1 | 0 | 2 | formula | N/A | N/A | N/A | N/A | Date | formula | Date | formula | N/A | N/A | N/A | N/A |
31 | QR | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | N/A | null | formula | N/A | null(0) | 1 | 0 | 2 | null(N) | 1 | 0 | 2 | formula | null(N) | 1 | 0 | 2 | formula | null | num | N/A | N/A | N/A | N/A | N/A | formula | formula | N/A | N/A |
32 | EVALUATION | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | text | formula | null | text | formula | N/A | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
33 | TRAINER (*10) | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | null | text | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | N/A | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
34 | PHONE Introduced in API version 2.7.22 | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | text | formula | null | text | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
35 | Introduced in API version 2.7.22 | Text | TWIG expression. Can contain OBJECT CODES | null(0) | 1 | 0 | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | null | text | formula | null | text | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | null | num | null | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
36 | Introduced in API version 2.7.23 | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | N/A | null(N) | Y | N | null(0) | 0 | 2 | null(N) | 1 | 0 | 2 | formula | null(N) | 1 | 0 | 2 | formula | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
37 | Introduced in API version 2.7.23 | Text | TWIG expression. Can contain OBJECT CODES | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
38 | Introduced in API version 2.7.25 | Text | TWIG expression. Can contain OBJECT CODES | N/A | null | JSON with format properties | null | JSON with format properties | N/A | N/A | N/A | N/A | N/A | N/A | null | text | formula | null(N) | Y | N | null(0) | 1 | 0 | 2 | null(N) | Y | N | formula | null(N) | Y | N | formula | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/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