Skip to content

Commit a40e047

Browse files
authored
Remove section about implicit merge
Refs #34
1 parent 2bd7734 commit a40e047

1 file changed

Lines changed: 0 additions & 45 deletions

File tree

README.md

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -477,51 +477,6 @@ will be mapped into:
477477
}
478478
```
479479

480-
#### Implicit merge
481-
482-
It also makes implicit merge, in case when `if`/`else` blocks return JSON objects, for example:
483-
484-
```json
485-
{
486-
"resourceType": "Patient",
487-
"address": {
488-
"type": "physical",
489-
"{% if QuestionnaireResponse.repeat(item).where(linkId='country').answer.exists() %}": {
490-
"country": "{{ QuestionnaireResponse.repeat(item).where(linkId='country').answer.value }}"
491-
},
492-
"{% else %}": {
493-
"text": "Unknown"
494-
}
495-
}
496-
}
497-
```
498-
499-
The final result will be either
500-
501-
```json
502-
{
503-
"resourceType": "Patient",
504-
"address": {
505-
"type": "physical",
506-
"country": "US"
507-
}
508-
}
509-
```
510-
511-
or
512-
513-
```json
514-
{
515-
"resourceType": "Patient",
516-
"address": {
517-
"type": "physical",
518-
"text": "Unknown"
519-
}
520-
}
521-
```
522-
523-
In this example, Patient address contains original `{"type": "physical"}` object and `country`/`text` is implicitly merged based on condition.
524-
525480
### Iteration logic
526481

527482
To iterate over the array of values, here's a special construction:

0 commit comments

Comments
 (0)