Functions
Functions can be used to perform operations on data, for example, to change strings or to compute other data. For mapping date/datetime variables you often need to convert into ISO 8601 format. The function “Convert date to ISO 8601” is used for this purpose. This section details the list of functions available with the Dataset Mapper plugin. For each listed function there is a description and the expected parameters for each function.
Boolean and true/false functions may be case sensitive.
Function Structure
Whenever users are able to specify a function mapping in any context the structure of the function will always be the same. The structure is as follows:
- Function Name - This is a dropdown list of all the possible functions in the system. Refer to the Function List section for detail on each individual function.
- Parameter - The Parameter element provides the arguments for each function. The function selected will determine which parameter elements should exist. By default there will only be one Parameter element. Users need to manually add more parameters if required. Below is an example of how this works.
Refer to the Function List section for the expected mapping structure for the parameters and the possible number of parameters for each function. Some Functions may also support regex operations.
As the sources are datasets, there are no null values - only blank values. If a blank value is passed as a parameter, it is treated as a blank value. For example, running the Concatenate Function on a Source variable A="First", B=null, C="Last" will result in a return of “FirstLast”. Issues for blank returns in function calls are reported in the conversion log.
Parameters follow the following typical structure:
Source Type
In this context, the Source Type is restricted to:
- None
- Source
- String
- Function
- Copy Mapping
- Choice
- ValueList: Name
- ValueList: Label
- ValueList: Data Value
- ValueList: Origin
- ValueList: Original Unit
- ValueList: Variable
- Sequence No: Number of Rows
- Sequence No: Number of Rows Per Subject
- Sequence No: Unscheduled Visit
- Populate IDVARVAL
- Comment Data Value
Source
See Variable Properties > Mapping for more details.
Controlled Terminology Lookup
See Variable Properties > Mapping for more details.
Function
See Variable Properties > Mapping for more details.
Copy Mapping
See Variable Properties > Mapping for more details.
Choice
See Variable Properties > Mapping for more details.
The parameter element is able to contain nested elements. This means that for a function, the first parameter can be a function on another set of parameters.
Function List
Below are all the functions in the system and the expected parameters for each one.
Convert date to ISO 8601
Purpose: Converts a date string or a numeric SAS date into an ISO 8601 date string, e.g. 1977-01-31
For SAS dates leave the date format blank. Unknown date components should appear in the date as "UN", "UNK", two hyphens or spaces ("--", " "), three hyphens or spaces ("---", " ")
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a mapping structure which returns the date string the user wishes to convert to an ISO 8601 format.
The second parameter should be a mapping structure that returns a specified format for the date string.
Example
In the example below a Source column VSDTC is selected to be converted into ISO format. A second parameter specifies the correct format.
Parameter 1: 31 Jan 1977
Parameter 2: dd MMM yyyy
Return: 1977-01-31
Convert time to ISO 8601
Purpose: Converts a time string or a numeric SAS time into an ISO 8601 time string, e.g. 13:22 For SAS times leave the time format blank
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a mapping structure which returns the time string the user wishes to convert to an ISO 8601 format.
The second parameter should be a mapping structure that returns a specified format for the time string.
Example
In the example below a Source column VSTIM is selected to be converted into ISO format. A second parameter specifies the correct format.
Parameter 1: 53100
Parameter 2: HH:mm
Return: 14:45
Convert datetime to ISO 8601
Purpose: Converts a datetime string or a numeric SAS datetime into an ISO 8601 datetime string, e.g. 1977-01- 31T13:22
For SAS datetimes leave the datetime format blank
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a mapping structure which returns the datetime string the user wishes to convert to an ISO 8601 format.
The second parameter should be a mapping structure that returns a specified format for the datetime string.
Example
In the example below a Source column VSDTC is selected to be converted into ISO format. A second parameter specifies the correct format.
Parameter 1: 31 Jan 1977 12:00
Parameter 2: dd MMM yyyy HH:mm
Return: 1977-01-31T12:00
Convert DMY to ISO 8601 date
Purpose: Converts a Date string into an ISO 8601 Date string.
Expected Number of Parameters: 2 or 3
Parameter detail: Parameter 1 users should return a mapping structure which is a string that will represent the Day component.
Parameter 2 users should return a mapping structure which is a string that will represent the Month component. Parameter 3 users should return a mapping structure which is a string that will represent the Year component.
Example
In the example below the first parameter returns the value of source column VSDAT_DD. The second parameter returns the value of source column VSDAT_MM. The third parameter returns the value of source column VSDAT_YY.
Parameter 1: 21
Parameter 2: JUN
Parameter 3: 2005
Return: 2005-06-21
Convert HMS to ISO 8601 time
Purpose: Converts a time string into an ISO 8601 time string.
Expected Number of Parameters: 3
Parameter detail: Parameter 1 users should return a mapping structure which is a string that will represent the Hour component.
Parameter 2 users should return a mapping structure which is a string that will represent the Minute component. Parameter 3 users should return a mapping structure which is a string that will represent the Second component.
Example
In the example below the first parameter uses a nested function to select the substring before the “:” in the VSTIM variable. The second parameter uses a nested function to select the substring after the “:” in the VSTIM variable. The function will ignore the missing third parameter.
Parameter 1: 12
Parameter 2: 13
Return: 12:13
Convert DMYHMS to ISO 8601 datetime
Purpose: Converts a datetime string into an ISO 8601 datetime string.
Expected Number of Parameters: 6
Parameter detail: Parameter 1 users should return a mapping structure which is a string that will represent the Day component.
Parameter 2 users should return a mapping structure which is a string that will represent the Month component. Parameter 3 users should return a mapping structure which is a string that will represent the Year component.
Parameter 4 users should return a mapping structure which is a string that will represent the Hour component. Parameter 5 users should return a mapping structure which is a string that will represent the Minute component. Parameter 6 users should return a mapping structure which is a string that will represent the Second component.
Example
In the example below the first parameter returns the value of source column VSDAT_DD. The second parameter returns the value of source column VSDAT_MM. The third parameter returns the value of source column VSDAT_YY. The fourth parameter uses a nested function to select the substring before the “:” in the VSTIM variable. The fifth parameter uses a nested function to select the substring after the “:” in the VSTIM variable. The function will ignore the missing sixth parameter.
Parameter 1: 21
Parameter 2: JUN
Parameter 3: 2005
Parameter 4: 12
Parameter 5: 09
Return: 2005-06-21T12:09
Convert ISO 8601 date to SAS
Purpose: Converts an ISO 8601 date string into SAS date format
Expected Number of Parameters: 1
Parameter detail: The parameter mapping structure should return the ISO 8601 date string the user wishes to convert to SAS date format.
Example
In the example below parameter 1 returns the values of the Source Variable VSDAT which is an ISO 8601 format.
Parameter 1: 2000-03-17
Return: 14686
Convert ISO 8601 time to SAS
Purpose: Converts an ISO 8601 time string into SAS time format
Expected Number of Parameters: 1
Parameter detail: The parameter mapping structure should return the ISO 8601 time string the user wishes to convert to SAS time format.
Example
In the example below parameter 1 returns the values of the Source Variable VSTIM which is an ISO 8601 format.
Parameter 1: 14:45
Return: 53100
Convert ISO 8601 datetime to SAS
Purpose: Converts an ISO 8601 datetime string into SAS datetime format
Expected Number of Parameters: 1
Parameter detail: The parameter mapping structure should return the ISO 8601datetime string the user wishes to convert to SAS datetime format.
Example
In the example below parameter 1 returns the values of the Source Variable VSDTC which is an ISO 8601 format.
Parameter 1: 1977-01-31T10:41
Return: 539174460
Compute duration
Purpose: Computes a duration string from two ISO 8601 dates / times / datetimes, defaulting to ISO 8601 standard format
Expected Number of Parameters: 2 or 3
Parameter detail: The first parameter mapping structure should return an ISO 8601 date/time/datetime string that will be treated as start date/time/datetime.
The second parameter mapping structure should return an ISO 8601 date/ time / datetime string that will be treated as the end date/time/datetime.
Note: Both Source Variables must be in the same format, for example, date (2021-10-17) or datetime (2021-10-17T07:44). If they are not in the same format then you must use another function to change the formatting.
The third parameter is an optional parameter which will be a string to denote the format for the duration to be displayed.
Example
In the example below parameter 1 uses a nested function to convert AESTDTC into an ISO 8601 format. The same is done in parameter 2 for AEENDTC.
Parameter 1: 1977-01-01
Parameter 2: 1978-02-02
Return: P1Y1M1D
Compute age
Purpose: Computes age based on two ISO 8601 dates. Defaults to Years.
Expected Number of Parameters: 2 or 3
Parameter detail: The first parameter mapping structure should return an ISO 8601 date/time/datetime string that will be treated as birth date/time/datetime.
The second parameter mapping structure should return an ISO 8601 date/ time / datetime string that will be treated as the current date/time/datetime.
Note: Both Source Variables must be in the same format, for example, date (2021-10-17) or datetime (2021-10-17T07:44). If they are not in the same format then you must use another function to change the formatting.
The third parameter is an optional parameter which will be a string the units for the output (years, months, weeks, days, hours, minutes, seconds - default to "years"). This value for this parameter is case insensitive.
Example
In the example below parameter 1 is the Source variable containing the subject’s date of birth. The second parameter is the date of collection. The return is the subject’s age in years by default as no third parameter is set. If a third parameter was set with the value of months the return would be “465”.
Parameter 1: 1977-01-31
Parameter 2: 2015-10-31
Return: 38
Compute DY
Purpose: Gets the study day of the second date compared to the first date
Expected Number of Parameters: 2
Parameter detail: The first parameter mapping structure should return an ISO 8601 date. This will be the start date. Note for this the first date is considered day 1. The day before the first date is considered day -1.
The second parameter mapping structure should return an ISO 8601 date. This will be the end date.
Note: Both Source Variables must be in the same format, for example, date (2021-10-17) or datetime (2021-10-17T07:44). If they are not in the same format then you must use another function to change the formatting.
Note as the functions requires to know the date in terms of which day of the year it is, if partial dates are given the full date will be imputed.
For partial dates including months, for example “2018-02”, the date imputed by the converter will be “2018-02-01” so it can correctly convert to which day of the year it is (32 in this case).
For partial dates including only the year, for example “2018”, the date imputed by the converter will be “2018-01-01” so it can correctly convert to which day of the year it is (1 in this case).
Example
In the example below parameter 1 is the reference start date for the Subject. Parameter 2 is the date time of collection. As it is prior to the reference start date the return is negative.
Parameter 1: 2012-05-29
Parameter 2: 2012-05-15T10:41
Return: -14
Length
Purpose: Returns the character count for a string.
Expected Number of Parameters: 1
Parameter detail: The parameter mapping structure should return the string the user wishes to calculate the string length of.
Example
In the example below the length of EXDOSE column is tested.
Parameter 1: 14.5
Return: 4
Uppercase
Purpose: Converts a string to uppercase
Expected Number of Parameters: 1
Parameter detail: The parameter mapping structure should return the string the user wishes to uppercase.
Example
In the example below the AETERM column is uppercased.
Parameter 1: Headache
Return: HEADACHE
Lowercase
Purpose: Converts a string to lowercase
Expected Number of Parameters: 1
Parameter detail: The parameter mapping structure should return the string the user wishes to lowercase.
Example
In the example below the DSTERM column is lowercased.
Parameter 1: INFORMED CONSENT
Return: informed consent
Trim
Purpose: Removes leading and trailing spaces
Expected Number of Parameters: 1
Parameter detail: The parameter mapping structure should return the string the user wishes to trim.
Example
In the example below the COVAL column is trimmed.
Parameter 1: Test String
Return: Test String
Concatenate
Purpose: Joins multiple strings
Expected Number of Parameters: Unlimited
Parameter detail: Each Parameter mapping structure should return the string that the user wishes to be included in the concatenation.
Example
In the example below parameter 1 will return the value of the PROJECT column value. Parameter 2 will return a “-“character. Parameter 3 will return the SUBJECT column value.
Parameter 1: ABC
Parameter 2: -
Parameter 3: 1001
Return: ABC-1001
Contains
"true" or "false" parameters are case sensitive.
Purpose: Returns 'true' if the test string is contained within the string
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a mapping structure that will return the string to that will be the source for the string check.
The second parameter should be a mapping structure that will return the string the user wishes to see contained inside parameter 1. This is case sensitive. This parameter does not support regex.
Example
In the example below parameter 1 will return the value of the PROJECT column value. Parameter 2 specifies the string of “GSK” to be searched for in parameter 1.
Parameter 1: GSK1001
Parameter 2: GSK
Return: true
Starts With
"true" or "false" parameters are case sensitive.
Purpose: Returns 'true' if the string starts with the test string
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a mapping structure that will return the string which will be the source for the string check.
The second parameter should be a mapping structure that will return the string the user wishes to see at the start of parameter 1. This is case sensitive. This parameter does not support regex.
Example
In the example below parameter 1 will return the value of the SUBJECT column value. Parameter 2 specifies the string of “200” to be searched as the start of parameter 1.
Parameter 1: 20010
Parameter 2: 200
Return: true
Ends With
"true" or "false" parameters are case sensitive.
Purpose: Returns 'true' if the string ends with the test string
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a mapping structure that will return the string which will be the source for the string check.
The second parameter should be a mapping structure that will return the string the user wishes to see at the end of parameter 1. This is case sensitive. This parameter does not support regex.
Example
In the example below parameter 1 will return the value of the SUBJECT column value. Parameter 2 specifies the string of “001” to be searched at the end of parameter 1.
Parameter 1: 20010
Parameter 2: 001
Return: false
Substring before
Purpose: Returns the string before the test string
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a mapping structure that will return the string which will be the source for the string check.
The second parameter should be a mapping structure that will return the marker in parameter 1 and everything before that marker will be returned. This is case sensitive. When there are multiple markers it will return everything before the first instance of the marker. This parameter does not support regex.
Example
In the example below parameter 1 will return the value of the SUBJECT column value. Parameter 2 specifies the string of “-” to be used as a marker for which to search everything before the marker.
Parameter 1: 1001-32
Parameter 2: -
Return: 1001
Substring after
Purpose: Returns the string after the test string
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a mapping structure that will return the string which will be the source for the string check.
The second parameter should be a mapping structure that will return the marker in parameter 1 and everything after that marker will be returned. This is case sensitive. When there are multiple markers it will return everything after the first instance of the marker. This parameter does not support regex.
Example
In the example below parameter 1 will return the value of the SUBJECT column value. Parameter 2 specifies the string of “-” to be used as a marker for which to search everything after the marker.
Parameter 1: 1001-32
Parameter 2: -
Return: 32
Substring
Purpose: Returns a string of the specified length starting at the specified position.
Expected Number of Parameters: 3
Parameter detail: The first parameter should be a mapping structure that will return the string which will be the source for the string check.
The second parameter should be an integer to denote the starting position in the string from parameter one. The third parameter should be an integer to denote the length for which the substring should occur.
Example
In the example below parameter 1 will return the value of the SUBJECT column value. Parameter 2 specifies the string of “3” which is used as the marker point in the string. Parameter 3 specifies number of characters after the marker to return.
Parameter 1: 1001-32
Parameter 2: 3
Parameter 3: 2
Return: 01
Split
Purpose: Splits string
Expected Number of Parameters: 3
Parameter detail: The first parameter should be a mapping structure that will return the string which will be the source for the string check.
The second parameter should be a mapping structure which returns a regular expression.
The third parameter should be an integer to denote at what position the first parameter should be split based on the second parameter.
Example
In the example below parameter 1 will return the value of the VSPOS column value. Parameter 2 specifies the string of “,” which is used as the delimiter to split the string. Parameter 3 specifies the index of the split to be returned. No trimming is done as part of the function so leading or trailing spaces would be retained.
Parameter 1: Upper, Right, Arm
Parameter 2: ,
Parameter 3: 2
Return: Right
Replace
Purpose: Find and replace in string
Expected Number of Parameters: 3
Parameter detail: The first parameter must be a mapping structure that will return the string which will be the source for the replacement operation.
The second parameter must match part of the source in Parameter 1.
The third parameter replaces the string in parameter 1 based on parameter 2.
Trailing spaces are retained.
Example
In the example below, if parameter 1 is the source variable's value "NAUSEA?". Parameter 2 specifies the string of “!” as the character to be replaced. Parameter 3 specifies the string “” to replace parameter 2 with. No trimming is done as part of the function so leading or trailing spaces would be retained.
Parameter 1: NAUSEA?
Parameter 2: ?
Parameter 3: !
Return: NAUSEA!
Example 2

PATIENTID Before | PATIENTID After |
|---|---|
38516 38517 38518 38519 | 516 517 518 519 |
| |
Example 3
In this example, a Regular Expression (REGEX) is used to match line breaks or carriage returns in the source data. These are replaced with an empty string.
- Parameter 1: Specifies the source variable which contains the data with carriage returns.
- Parameter 2: \r*\n* matches:
- Zero or more carriage return characters (\r)
- Zero or more newline characters (\n)
- * is a quantifier that matches 0 or more occurrences of the preceding element
- Parameter 3: is an empty string, which means the line breaks are removed.

Translate
Purpose: Translates specific characters
Expected Number of Parameters: 3
Parameter detail: The first parameter should be a mapping structure that will return the string which will be the source for the string check.
The second parameter should be a mapping that returns a string to translate from.
The third parameter should be a mapping structure that will return the string match you wish translate to.
Example
In the example below parameter 1 will return the value of the CETERM column value. Parameter 2 specifies the string of “--” which is used as the character to be replaced. Parameter 3 specifies the string “” to replace parameter 2 with.
Parameter 1: NAUSEA1231
Parameter 2: 12
Parameter 3:
Return: NAUSEA3
Example2

PATIENTID Before | PATIENTID After |
|---|---|
38516 38517 38518 38519 | 16 17 1 19 |
Clean
Purpose: Removes all non-alphanumeric characters
Expected Number of Parameters: 1
Parameter detail: The first parameter should be a mapping structure that will return the string which should have all non-alphanumeric characters removed. This is strictly the upper and lowercase A-Z letters and 0-9.
Example
In the example below parameter 1 is the value of a mapped variable..
Parameter 1: *PNEUMONIA*
Return: PNEUMONIA
Format
Purpose: Generates a string in a specified format.
Expected Number of Parameters: Unlimited
Parameter detail: The first parameter should be a mapping structure to return the format the user wishes to be implemented on the list of strings provided in the following parameter. The format can be any regular expression.
Once the format is specified in parameter 1 users can implement unlimited parameters after this for which the format in parameter will be applied too.
Example
In the example below parameter 1 specifies a regular expression to uppercase characters. Parameter 2 reads the value of the source column of COVAL.
Parameter 1: %B
Parameter 2: This is a comment
Return: THIS IS A COMMENT
Wordwrap
Purpose: Splits text strings at word boundaries.
Expected Number of Parameters: 3
Parameter detail: The first parameter should be a mapping structure that will return the string which will be the source for the string check.
The second parameter should be an integer to denote length of text to be taken from parameter one.
The third parameter should be an integer to denote the index for where the split should happen in the string provided in parameter 1, based on the size from parameter 2.
Example
The example below details the mapping for the COVAL2 variable. Parameter 1 will return the value of the COVAL column value. Parameter 2 specifies to split parameter 1 into chunks of 200. Parameter then selects the second chunk. Chunks will not split on full words.
Parameter 1: COVAL [value of length 500]
Parameter 2: 200
Parameter 3: 2
Return: Characters in the 200-400 range with respect to word boundaries.
Maximum
Purpose: Returns Maximum for a set of numbers
Expected Number of Parameters: Unlimited
Parameter detail: Each parameter should be a mapping structure that returns an integer.
Example
In the example below parameter 1 will return the value of the DOSE1 column value. Parameter 2 will return DOSE2 and parameter 3 will return DOSE3. Note that null results will be ignored.
Parameter 1: 10
Parameter 2: 23
Parameter 3: 15
Return: 23
Minimum
Purpose: Returns Minimum for a set of numbers
Expected Number of Parameters: Unlimited
Parameter detail: Each parameter should be a mapping structure that returns an integer.
Example
In the example below parameter 1 will return the value of the DOSE1 column value. Parameter 2 will return DOSE2 and parameter 3 will return DOSE3. Note that null results will be ignored.
Parameter 1: 10
Parameter 2:
Parameter 3: 15
Return: 10
Add
Purpose: Numeric Addition (A+B)
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a number that will be used as part of the addition. The second parameter should be an integer that will be used as part of the addition.
Example
In the example below parameter 1 will return the value of the DOSE1 column value. Parameter 2 will return DOSE2.
Parameter 1: 10
Parameter 2: 20
Return: 30
Subtract
Purpose: Numeric Subtraction (A-B)
Expected Number of Parameters: 2
Parameter detail: Numeric inputs and outputs (integer or float) must be used.
The first parameter is a number that is used as part of the subtraction.
The second parameter is a number that is used as part of the subtraction.
Example
Parameter 1: 10
Parameter 2: 20
Return: -10
Multiply
Purpose: Multiply (AxB)
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a number that will be used as part of the Multiplication. The second parameter should be an integer that will be used as part of the Multiplication.
Example
In the example below parameter 1 will return the value of the DOSE1 column value. Parameter 2 will return DOSE2.
Parameter 1: 10
Parameter 2: 20
Return: 200
Divide
Purpose: Divide (A÷B)
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a number which will be the dividend. The second parameter should be an integer which will be the divisor.
Example
In the example below parameter 1 will return the value of the DOSE1 column value. Parameter 2 will return DOSE2.
Parameter 1: 10
Parameter 2: 20
Return: 0.5
And
"true" or "false" parameters are case sensitive.
Purpose: Boolean (A and B). Function will return true if both A and B are equal.
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a mapping structure which returns a true or false to be used as the first part of the Boolean And check.
The second parameter should be a mapping structure which returns a true or false to be used as the second part of the Boolean And check.
Example
In the example below parameter 1 will return the value of the “true”. Parameter 2 will return the value of “true”.
Parameter 1: true
Parameter 2: true
Return: true
Or
Purpose: Boolean (A or B). Function will return true if A or B exist, otherwise return false
Expected Number of Parameters: 2
Parameter detail: The first parameter should be a mapping structure which returns a true or false to be used as the first part of the Boolean Or check.
The second parameter should be a mapping structure which returns a true or false to be used as the second part of the Boolean Or check.
Example
In the example below parameter 1 will return the value of the “true”. Parameter 2 will return the value of “false”.
Parameter 1: true
Parameter 2: false
Return: true
Not
Purpose: Boolean Not(A)
Expected Number of Parameters: 1
Parameter detail: The first parameter should be a mapping structure which returns true or false. The result of this function will be the opposite of this parameter.
Example
In the example below parameter 1 will return the value of the “true”.
Parameter 1: true
Return: false
Is Numeric
"true" or "false" parameters are case sensitive.
Purpose: Returns 'true' if the value is a number, otherwise return ‘false’.
Expected Number of Parameters: 1
Parameter detail: The first parameter should be a mapping structure that will return the value for the numeric check.
Example
In the example below parameter 1 will return the value of the “65.6”.
Parameter 1: 65.6
Return: true
Is integer
"true" or "false" parameters are case sensitive.
Purpose: Returns 'true' if the value is an integer, otherwise return ‘false’.
Expected Number of Parameters: 1
Parameter detail: The first parameter should be a mapping structure that will return the value for the integer check.
Example
In the example below parameter 1 will return the value of the “65.6”.
Parameter 1: 65.6
Return: false
Is float
"true" or "false" parameters are case sensitive.
Purpose: Returns 'true' if the value has a decimal component, otherwise return ‘false’.
Expected Number of Parameters: 1
Parameter detail: The first parameter should be a mapping structure that will return the value for the decimal check.
Example
In the example below parameter 1 will return the value of the “65.6”.
Parameter 1: 65.6
Return: true
Round
Purpose: Rounds using the specified number of decimal places. Defaults to "half up" rounding
Expected Number of Parameters: 2 or 3
Parameter detail: The first parameter should be a mapping structure that will return an number to be rounded. The second parameter should be an integer to denote the maximum number of decimal places.
The third parameter is optional to denote the type of rounding i.e. ceiling, floor, up, down, half up, half down, half even. This is case insensitive.
Example
In the example below parameter 1 will return the value of the “1.05”. Parameter 2 specifies the string of “3” and parameter specifies the optional parameter of “floor”
Parameter 1: 1.0554
Parameter 2: 3
Parameter 3: floor
Return: 1.055
Get Standard Unit
Purpose: This function returns the standard unit for a given original unit, with the specified context
Expected Number of Parameters: up to 6
Parameter detail: The first parameter should be a mapping structure that returns a string which is the original unit for conversion. This should match a coded value in a CodeList with map: Unit Conversion property set to Yes.
The next 5 parameter are optional parameters to satisfy the When condition of the Standard Unit mapping.
Example
In the example below parameter 1 uses the ValueList Original Unit functionality to return the Standard unit. The example below shows how users set the unit conversion for Weight collection values. The conversion will convert “lb” to “kg”. Users must specify that on “lb” what they want to convert too and specify the formula to drive this conversion. Users must also specify on “kg” that this will be the converted value.
Parameter 1: lb
Return: kg
Convert to Standard Unit
Purpose: Performs conversions to standardized units. The standard units for each original unit are specified in a controlled terminology. Original units can map to different standard units depending on parameters like TESTCD, METHOD etc.
Expected Number of Parameters: up to 6
Parameter detail: The correct Standard Unit is found as per "Get standard unit". The value is then converted into that unit using the specified conversion factors.
Standard Value = Constant A / Constant B * (Original Value + Constant C) + Constant K Constant A and Constant B default to "1"
Constant C and Constant K default to "0"
Example
In the example below parameter 1 uses the ValueList Data Value functionality to return the value which is to be converted to the standardized format. The second parameter uses the ValueList Original Unit functionality to return the Standard unit.
Parameter 1: 180
Parameter 2: lb
Return: 81.6