For parameters with options, this determines how a categorical value retrieved from the database is converted into a label to be displayed to the user. For example, mapping the value '1' to the label 'Female' is handled using one of these methods.
Label resolution methods
1. Use parameter options
Define the values and labels as a static list of options. No additional queries are executed; this is suitable for lists that do not change frequently. Other option query fields are left blank.
-
Required: The list of options must be manually added to the options list field.
-
Server and table settings are not used.
-
The label is read directly from the static list.
-
Recommended for small, static lists.
2. Retrieve the option label via a query
Fetch both the value and the label within the same SQL query. For a simple lookup, join the
Patient.GenderId
and
Gender.Id
fields, and select
Gender.Name
as the label. If only active rows are required, add a
State = 1
condition. For labels composed of multiple columns—such as a doctor's name—use the
CONCAT
function within the label selection query.
-
Required: Option table name
-
Required: Option value column
-
Either the label column or the label selection query must be provided
-
Optional: Option join condition
SELECT
Patient.GenderId,
Gender.Name
AS
label
FROM
Patient
LEFT JOIN
Gender
ON
Gender.Id = Patient.GenderId
WHERE
Patient.Id =
'12345'
3. Post-parameter query
If the label cannot be joined within the same query, first retrieve the parameter value, then send a separate query to the lookup source—which may reside on a different server or database. Since this method incurs the cost of an additional query, it should only be used when the sources cannot be joined in a single query.
-
Required: target server group and server ID
-
Required: target table, value column, and label column
-
Optional: a different database group for the target
-
Optional: additional WHERE clause
4. Use database mapping
Define standard options within an option list and map the values from the source database to these options. In WisdomEra standard mappings, this enables algorithms to operate using fixed, consistent values.
For example, the standard of Female = 1 and Male = 2 can be maintained.
-
Required: list of options
-
Required: database mappings for the options
-
Other option query fields are left blank
-
Recommended for standard mappings
Options and intended uses
0 — use parameter options
Retrieves the label from a fixed list of options.
1 — retrieve option label via query
Retrieves both the value and the label in the same query.
2 — post-parameter query
Resolves the label using a separate query.
3 — use database mapping
Converts the source value into a standard label.