settoflagnode properties
The SetToFlag node derives multiple flag fields based on the categorical values defined for one or more nominal fields.
Example
node = stream.create("settoflag", "My node")
node.setKeyedPropertyValue("fields_from", "Drug", ["drugA", "drugX"])
node.setPropertyValue("true_value", "1")
node.setPropertyValue("false_value", "0")
node.setPropertyValue("use_extension", True)
node.setPropertyValue("extension", "Drug_Flag")
node.setPropertyValue("add_as", "Suffix")
node.setPropertyValue("aggregate", True)
node.setPropertyValue("keys", ["Cholesterol"])
settoflagnode properties |
Data type | Property description |
---|---|---|
fields_from
|
[category category category]
all
|
|
true_value
|
string | Specifies the true value used by the node when setting a flag. The default is
T . |
false_value
|
string | Specifies the false value used by the node when setting a flag. The default is
F . |
use_extension
|
flag | Use an extension as a suffix or prefix to the new flag field. |
extension
|
string | |
add_as
|
Suffix
Prefix
|
Specifies whether the extension is added as a suffix or prefix. |
aggregate
|
flag | Groups records together based on key fields. All flag fields in a group are enabled if any record is set to true. |
keys
|
list | Key fields. |