/
CODE_LIST()

CODE_LIST()

CODE_LIST(standard_code)

API Version

2.7.32 and higher

Returns a list of CODES (See CODE OBJECTS ) that can be used to populate a list of options in ITEM TEMPLATES of type RADIO, CHECKBOX or SELECT

This FORMULA is intended to be use as a generator of options for ITEMS of type RADIO BUTTON, CHECKBOX or SELECT (see ITEM TYPE and #ELEMENT:CHOICE). To generate options dynamically this formula should be placed in the "OPTIONS" field of an ITEM of type RADIO BUTTON, CHECKBOX or SELECT.


Input Parameters

Parameters

Type

Default

Required

Description

Parameters

Type

Default

Required

Description

standard_code

String



Yes

CODE standard that indicates which is the list of CODES that we want to retrieve.

Return value

Returns an array of options. Each item of the array is another array containing the following properties:

  • ID: An unique identifier for the option

  • DESC: Name of the professional

  • VALUE: ID of the professional

Return value example:

[ ["ID" => "DIAGNOSES", "DESC" => "Diagnoses", "VALUE" => "DIAGNOSES"], [ID" => "FAMILY_ANTECEDENTS", "DESC" => "Family antecedents> "FAMILY_ANTECEDENTS"] ]

Execution

Always. Calculated on-the-fly whenever an ITEM of a FORM is changed (by means of form_set_answer(), or when the FORM is opened

Examples

Formula

Description

Formula

Description

CODE_LIST(“#HEALTH.PROFILE“)

Return a list with all the CODES that correspond to the standard code “#HEALTH.PROFILE

 

Related content