7. default

Last updated: Sep 26, 2025
DEVELOPER
IMPLEMENTATION
HEALTH TECH VENDOR

Definition

In a config modifier schema, use default to specify a value to return if any of the previous keywords result in a non-existent value. This value can be a primitive value or an object.

Nesting level

This keyword executes at the following nesting level:

  1. omit
  2. constant
  3. references
  4. use
  5. get
  6. properties or if or concat or switch or pipe or merge
  7. default
  8. plugin

Example

You could set a default value for a specific value if it doesn’t exist in the input.

For example, if SCH.25.1 is missing from the initialPayload (an HL7v2 message in the scenario below), you can set the Visit.Status property to a default value of “Scheduled” in the Scheduling data model message.

Example: Default input
json
1
"SCH": {
2
"2": {
3
"1": "123456",
4
"2": "HST"
5
},
6
"3": "1",
7
"7": {
8
"1": "",
9
"2": "**Comment Notes here***"
10
},
11
"9": "0001",
12
"10": {
13
"1": "s"
14
},
15
"11": [
16
{
17
"1": {
18
"1": ""
19
},
20
"2": {
21
"1": ""
22
},
23
"3": "",
24
"4": {
25
"1": "20250924111500"
26
},
27
"5": {
28
"1": "20250924121500"
29
}
30
}
31
],
32
"16": [
33
{
34
"1": "",
35
"2": {
36
"1": "Mouse"
37
},
38
"3": "Mickey"
39
}
40
],
41
"20": [
42
{
43
"1": "",
44
"2": {
45
"1": "Mouse, Mickey"
46
}
47
}
48
]
49
},
Example: Default selector
json
1
$.Visit.Status
Example: Config modifier with default keyword
yaml
1
use: initialPayload
2
get: SCH.25.1
3
default: Scheduled
Example: Default output
json
1
"Visit": {
2
...
3
"Status": "Scheduled",
4
...
5
}