In a config modifier schema, use plugin to define a bundle of functionality to produce a value. You can use one of these sub-keywords to construct a plugin:
Sub-keyword | Notes |
---|---|
name | Defines the name of the plugin to apply. |
action | Specifies the action to perform with this plugin. |
parameters | Lists individual operations for a given plugin.action. |
This keyword executes at the following nesting level:
- omit
- constant
- references
- use
- get
- properties or if or concat or switch or pipe or merge
- default
- plugin
Bundles functionality for handling date values with time. This is referenced as name: date-time.
Identifies how to read an incoming date-time value; outputs an ISO-8601 string.
Parameter | Notes |
---|---|
standard: string (mutually exclusive with custom) | A named identifier for the format of the input. The default is ISO. |
custom: string (mutually exclusive with standard) | A custom-defined format for how to parse the input (ex: yyyy MM/dd HH:mm:ss). |
timeZone: string | The time zone of the input. See possible time zone values. The default is UTC. If the input already includes an offset or time zone information then this parameter is unused. |
outputTimeZone: string | The time zone of the output. The default is UTC. |
1"25 Nov 2016 13:23:12 Z"
1plugin:2name: date-time3action: parse4parameters:5standard: RFC2822
12016-11-25T13:23:12.000Z
Reads an ISO-8601 string and outputs into the specified format.
Parameter | Notes |
---|---|
standard: string (mutually exclusive with custom) | A named identifier for the format of the input. The default is ISO. |
custom: string (mutually exclusive with standard) | A custom-defined format for how to parse the input (ex: yyyy MM/dd HH:mm:ss). |
Parameter | Notes |
---|---|
timeZone: string | The time zone of the input. See possible time zone values. The default is UTC. If the input already includes an offset or time zone information then this parameter is unused. |
1"2016-05-25T09:08:34.123Z"
1plugin:2name: date-time3action: render4parameters:5standard: HL76timeZone: America/Denver
120160525030834
Generates the current DateTime and then renders the output.
Parameter | Notes |
---|---|
standard: string (mutually exclusive with custom) | A named identifier for the format of the input. The default is ISO. |
custom: string (mutually exclusive with standard) | A custom-defined format for how to parse the input (ex: yyyy MM/dd HH:mm:ss). |
Parameter | Notes |
---|---|
timeZone: string | The time zone of the input. See possible time zone values. The default is UTC. If the input already includes an offset or time zone information then this parameter is unused. |
1n/a
1schema:2plugin:3name: date-time4action: now5parameters:6standard: RFC2822
1Tue, 06 Sep 2022 15:19:42 +0000
Bundles functionality for handling date values. This is referenced as name: date.
Identifies how to read an incoming date value.
Parameter | Notes |
---|---|
standard: string (mutually exclusive with custom) | A named identifier for the format of the input. The default is ISO. |
custom: string (mutually exclusive with standard) | A custom-defined format for how to parse the input (ex: yyyy MM/dd). |
1"20220729"
1plugin:2name: date3action: parse4parameters:5standard: HL7
1"2022-07-29"
Identifies how to create an output date value.
Parameter | Notes |
---|---|
standard: string (mutually exclusive with custom) | A named identifier for the format of the input. |
custom: string (mutually exclusive with standard) | A custom-defined format for how to render the input (ex: yyyy MM/dd). |
1"2022-07-29"
1plugin:2name: date3action: render4parameters:5standard: HL7
120160525
Generates the current date and then renders the output.
Parameter | Notes |
---|---|
standard: string (mutually exclusive with custom) | A named identifier for the format of the input. |
custom: string (mutually exclusive with standard) | A custom-defined format for how to parse the input (ex: yyyy MM/dd). |
1n/a
1plugin:2name: date3action: now4parameters:5standard: HL7
1"20220729"
Bundles functionality for handling Social Security number values. This is referenced as name: ssn.
Formats a string into a Social Security number in either of these formats: xxx-xx-xxxx and xxxxxxxxx. Any leading or trailing whitespace are trimmed and non-numeric characters are removed.
Validation of a “correct” Social Security number isn't performed. A valid shape but invalid content (ex: 000-12-3456) won't be rejected.
Parameter | Notes |
---|---|
dashes: boolean | Controls if the output is rendered with or without dashes. If not specified, the default is true. |
1"000123456"
1plugin:2name: ssn3action: format
1"000-12-3456"
Bundles functionality for handling phone number values. This is referenced as name: phone-number.
Parses a string into a valid phone number format. This action returns undefined if unable to parse the input.
Parameter | Notes |
---|---|
renderFormat: string | Specifies the output to render. If not specified, the default is e164. |
1"800-123-4567"
1plugin:2name: phone-number3action: format4parameters:5renderFormat: international
1+1 800-123-4567
Bundles functionality for manipulating text values. This is referenced as name: text.
Converts an input string to upper case.
There aren't any required or optional parameters for upper-case.
1"hello world"
1plugin:2name: text3action: upper-case
1"HELLO WORLD"
Converts an input string to lower case.
There aren't any required or optional parameters for lower-case.
1"HELLO WORLD"
1plugin:2name: text3action: lower-case
1"hello world"
Removes leading and trailing whitespace from the input string.
Parameter | Notes |
---|---|
normalizeWhitespace: boolean | Indicates whether whitespace is converted. The default is true, which converts any whitespace within the input string to one character whitespace. For example, Bob Smith becomes Bob Smith. The false value doesn't convert whitespace within the input string. For example, Bob Smith stays the same. |
1" a b c "
1plugin:2name: text3action: trim
1"a b c"
Splits a string value on a supplied separator and returns the resulting string array. This optionally allows retrieving a specific value by index, returning only the string.
Parameter | Notes |
---|---|
separator: string | A string value used to split the input string. |
Parameter | Notes |
---|---|
getIndex: number | A number that'll be used to retrieve a specific value using a zero-based index. |
fromEnd: boolean | If true, the start index begins from the end of the array and retrieves the last value first. If specified, getIndex is required. If not specified, the default is false. |
1"a,b,c"
1plugin:2name: text3action: split4parameters:5separator: ','
1[2"a",3"b",4"c"5]
Identifies an input string value and replaces occurrences of a given search value with a new value.
This is a global replace operation. All occurrences of the search value are replaced with the new value.
There's no attempt to trim or normalize whitespace. If you require that functionality, you'll first need to sanitize your input value with the trim operator.
Parameter | Notes |
---|---|
newValue: string | A string value that serves as the replacement value. If not specified, the plugin returns an undefined value. |
Parameter | Notes |
---|---|
searchValue: string | The value that newValue replaces. If not specified, this defaults to a single whitespace. |
1"identifier": [2{3"system": "urn:redox:1a359110-47eb-40f6-924c-1e67079574a4:wshmrn",4"type": {5"text": "WSHMRN"6},7"value": "050050184"8},9...10],
1$.entry[?(@.resource.resourceType=="Patient")].resource.identifier[*]
1if:2operator: all3terms:4- get: type.text5then:6if:7operator: equals8terms:9- get: type.text10- constant: WSHMRN11then:12merge:13- {}14- properties:15type:16properties:17text:18constant: MR19system:20get: system21plugin:22name: text23action: replace24parameters:25newValue: mr26searchValue: wshmrn27else:28comment: do nothing29else:30comment: type.text does not exist, do nothing
1"identifier": [2{3"system": "urn:redox:1a359110-47eb-40f6-924c-1e67079574a4:mr",4"type": {5"text": "MR"6},7"value": "050050184"8},9...10],
Bundles functionality for handling array values. This is referenced as name: array.
The array options are:
- filter
- find
- join
- last
- sort
- unique
- without
Review examples for each below.
Returns an array of values that match the specified value.
Parameter | Notes |
---|---|
match: string | A string value used to compare to other values within an input array. |
Parameter | Notes |
---|---|
partial: boolean | The default value is false. Indicates that a partial match won't be performed. If set to true, performs a case-sensitive partial match for the specified value(s). Some array actions accept a boolean partial parameter. When this is set to true the following rules are enacted: 1) The value of parameters.match can be a string value or an object (as makes sense for your input value). Non-string values will use exact matching. 2) If multiple key/value pairs are provided in parameters.match and logic is used, each key/value pair must partially match. |
1[21,32,43,516]
1plugin:2name: array3action: filter4parameters:5match: 1
1[21,314]
Returns the first value that matches the specified value; otherwise, returns undefined if no match is found.
Parameter | Notes |
---|---|
match: string | A string value used to compare to other values within an input array. |
Parameter | Notes |
---|---|
partial: boolean | The default value is false. Indicates that a partial match won't be performed. If set to true, performs a case-sensitive partial match for the specified value(s). Some array actions accept a boolean partial parameter. When this is set to true the following rules are enacted: 1) The value of parameters.match can be a string value or an object (as makes sense for your input value). Non-string values will use exact matching. 2) If multiple key/value pairs are provided in parameters.match and logic is used, each key/value pair must partially match. |
1[21,32,43,516]
1plugin:2name: array3action: find4parameters:5match: 1
11
1[2{3"firstName": "Joseph",4"lastName": "Wilson"5},6{7"firstName": "John",8"lastName": "Doe"9}10]
1plugin:2name: array3action: find4parameters:5match:6firstName: 'Jo'7lastName: 'Do'8partial: true
1{2"firstName": "John",3"lastName": "Doe"4}
Creates a string from the contents of the array and the separator.
Parameter | Notes |
---|---|
separator: string | A string value that'll be inserted immediately after each element in the array, excepting the final value in the array. |
1[2"a",3"b",4"c"5]
1plugin:2name: array3action: join4parameters:5separator: ','
1"a,b,c"
Retrieves the last element in an array.
There aren't any required or optional parameters for last.
1[21,32,435]
1plugin:2name: array3action: last
13
Sorts the array as indicated.
This operator can sort both primitive and object arrays.
Parameter | Notes |
---|---|
order: Array of Objects | Directs how to sort the input array. If not specified, a primitive array is sorted in asc order. An object array isn't sorted. If direction isn't specified, the array is sorted in asc order. If multiple directions are specified, they're evaluated in order. For example, it might sort an array first by age, then by last name. If you specify any direction other than asc or desc, the order parameter is ignored and not applied. If any other directions are defined, they are also ignored. If by isn't specified, a primitive array is sorted according to direction. An object array isn't sorted. |
1[2{3"name": "John",4"age": 305},6{7"name": "Jane",8"age": 359}10]
1plugin:2name: array3action: sort4parameters:5order:6- by: age7direction: desc
1[2{3"name": "Jane",4"age": 355},6{7"name": "John",8"age": 309}10]
Returns an array of distinct values.
Parameter | Notes |
---|---|
match: string | A string value that'll be used as the de-duplication key for a non-primitive array. If a primitive array, the value of match is ignored. If an object array, the value of match uses that object property value as the de-duplication key. |
1[2"a",3"b",4"c",5"a"6]
1plugin:2name: array3action: unique
1[2"a",3"b",4"c"5]
Returns an array of values that don't match the specified value.
Parameter | Notes |
---|---|
match: string | A string value used to compare to other values within an input array. |
Parameter | Notes |
---|---|
partial: boolean | The default value is false. Indicates that a partial match won't be performed. If set to true, performs a case-sensitive partial match for the specified value(s). Some array actions accept a boolean partial parameter. When this is set to true the following rules are enacted: 1) The value of parameters.match can be a string value or an object (as makes sense for your input value). Non-string values will use exact matching. 2) If multiple key/value pairs are provided in parameters.match and logic is used, each key/value pair must partially match. |
1[21,32,43,516]
1plugin:2name: array3action: without4parameters:5match: 1
1[22,334]
Bundles functionality for handling URI values. This is referenced as name: uri.
Encodes a uri or uriComponent.
Parameter | Notes |
---|---|
isComponent: boolean | Indicates whether the underlying value should be interpreted as a full URI or just a URI component. |
1"https://example.com/?x=шеллы"
1plugin:2name: uri3action: encode
1"https://example.com/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B"
Decodes a uri or uriComponent.
Parameter | Notes |
---|---|
isComponent: boolean | Indicates whether the underlying value should be interpreted as a full URI or just a URI component. |
1"https://example.com/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B"
1plugin:2name: uri3action: decode
1"https://example.com/?x=шеллы"
Bundles functionality for handling UUID or GUID values. This is referenced as name: uuid.
Creates a version 4 UUID. Learn about version 4.
There aren't any required or optional parameters for generate.
No input is needed for the UUID plugin.
1plugin:2name: uuid3action: generate
1"793d6d8b-40a8-41b9-8e39-dd40e73df748"
Bundles functionality for converting from one value type to another. This is referenced as name: convert.
Converts a set of string values to their boolean equivalent.
- 'true' to true
- 'yes' to true
- 'no' to false
- 'false' to false
- 'null' to null
If the input value isn't a string or any of the values listed above, then the response returns undefined.
Also note that either single or double quotes are supported for any of the string values.
There aren't any required or optional parameters for string-to-boolean.
1"yes"
1plugin:2name: convert3action: string-to-boolean
1true
Converts a boolean value to its string equivalent.
- true to 'true'
- false to 'false'
If the input value isn't a boolean, then the response returns undefined.
Also note that either single or double quotes are supported for either of the string values.
There aren't any required or optional parameters for boolean-to-string.
1true
1plugin:2name: convert3action: boolean-to-string
1"true"
Converts a numeric value to its string equivalent.
- 123 to '123'
- -100 to '-100'
- 123.1 to '123.1'
- 9007199254740992 to '9007199254740992'
If the input value isn't numeric, then the response returns undefined.
Also note that either single or double quotes are supported for either of the string values.
There aren't any required or optional parameters for number-to-string.
11
1plugin:2name: convert3action: number-to-string
1"1"
Converts a string value to a numeric value.
- '123' to 123
- '-100' to -100
- '123.1' to 123.1
- '9007199254740992' to 9007199254740992
If the input value isn't a string, then the response returns undefined.
Also note that either single or double quotes are supported for either of the string values.
There aren't any required or optional parameters for string-to-number.
1"1"
1plugin:2name: convert3action: string-to-number
11
Several of our plugins require you to specify a format. These are valid formats for various plugins.
Identifier | Output as E.164 |
---|---|
+18001234567 | +18001234567 (stays the same) |
800.123.4567 | +18001234567 |
800-123-4567 | +18001234567 |
800 123 4567 | +18001234567 |
tel:+1-800-123-4567 | +18001234567 |
8001234567 | +18001234567 |
(800) 123-4567 | +18001234567 |
18001234567 | +18001234567 |
(800) 123-4567ext987 | +18001234567 |
Identifier | Example |
---|---|
e164 | +18001234567 |
international | +1 800-123-4567 |
national | (800) 123-4567 |
rfc3966 | tel:+1-800-123-4567 |
significant | 8001234567 |
Identifier | Example(s) |
---|---|
HL7 | 20220729114900 20220729114900.123 20220729114900-0600 |
ISO | 2016-05-25T09:08:34.123 2016-05-25T09:08:34.123-06:00 |
HTTP | Sun, 06 Nov 1994 08:49:37 GMT Sunday, 06-Nov-94 08:49:37 GMT Sun Nov 6 08:49:37 1994 |
SQL We currently only render with offsets, not timezones | 2017-05-15 09:12:34 2017-05-15 09:12:34.342-06:00 2017-05-15 09:12:34.342 America/Los_Angeles |
milliseconds Number of milliseconds since January 1, 1979 at midnight UTC/GMT | 1659095340000 |
seconds Number of seconds since January 1, 1979 at midnight UTC/GMT | 1659095340 |
RFC2822 We currently only render date-times that look like Fri, 29 Jul 2022 11:49:00 +0000 | 25 Nov 2016 13:23:12 GMT Fri, 25 Nov 2016 13:23:12 +0600 25 Nov 2016 13:23 Z |
A custom format is a build-your-own format. You can use commonly used tokens to build a format that suits your needs. These formats aren't recognized as industry-regulated, but the tokens are well known, all the same.
You can use either a custom or standard format, not both.
Token | Description | Example output |
---|---|---|
S | millisecond, no padding | 54 |
SSS | millisecond, padded to three | 05 |
s | second, no padding | 4 |
ss | second, padded to two padding | 04 |
m | minute, no padding | 7 |
mm | minute, padded to two | 07 |
h | hour in 12-hour time, no padding | 1 |
hh | hour in 12-hour time, padded to two | 01 |
H | hour in 24-hour time, no padding | 13 |
HH | hour in 24-hour time, padded to two | 13 |
Z | narrow offset | +5 |
ZZ | short offset | +05:00 |
techie offset | +0500 | |
z | IANA zone | America/New_York |
a | meridiem | AM |
d | day of the month, no padding | 6 |
dd | day of the month, padded to two | 06 |
EEE | day of the week, as an abbreviated localized string | Wed |
EEEE | day of the week, as an unabbreviated localized string | Wednesday |
M | month as an unpadded number | 8 |
MM | month as a padded number | 08 |
MMM | month as an abbreviated localized string | Aug |
MMMM | month as an unabbreviated localized string | August |
yy | two-digit year, interpreted as >1960 | 14 |
yyyy | four-digit year | 2014 |
D | localized numeric date | 9/6/2014 |
DD | localized date with abbreviated month | Aug 6, 2014 |
DDD | localized date with full month | August 6, 2014 |
DDDD | localized date with full month and weekday | Wednesday, August 6, 2014 |
Identifier | Example(s) |
---|---|
HL7 | 20220729 |
ISO | 2016-05-25 |
SQL | 2017-05-15 |
A custom format is a build-your-own format. You can use commonly used tokens to build a format that suits your needs. These formats aren't recognized as industry-regulated, but the tokens are well known, all the same.
You can use either a custom or standard format, not both.
Token | Description | Example output |
---|---|---|
d | day of the month, no padding | 6 |
dd | day of the month, padded to two | 06 |
EEE | day of the week, as an abbreviated localized string | Wed |
EEEE | day of the week, as an unabbreviated localized string | Wednesday |
M | month as an unpadded number | 8 |
MM | month as a padded number | 08 |
MMM | month as an abbreviated localized string | Aug |
MMMM | month as an unabbreviated localized string | August |
yy | two-digit year, interpreted as >1960 | 14 |
yyyy | four-digit year | 2014 |
D | localized numeric date | 9/6/2014 |
DD | localized date with abbreviated month | Aug 6, 2014 |
DDD | localized date with full month | August 6, 2014 |
DDDD | localized date with full month and weekday | Wednesday, August 6, 2014 |
FHIR® is a registered trademark of Health Level Seven International (HL7) and is used with the permission of HL7. Use of this trademark does not constitute an endorsement of products/services by HL7®.