-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative to JUTE $map directive proposal #1
Comments
How to deal with mapping values from multiple QR fields into one array attribute, let's say I want to populate I can suggest, something like:
For one hardcoded telecom:
So, if the key contains expression, it should be mapped to array of objects. |
Another possible approach that leverages https://shopify.github.io/liquid/tags/iteration/#for {
"resourceType": "Bundle",
"type": "transaction",
"entry": [{
"request": {
"url": "{{ '/Patient/' + QuestionnaireResponse.repeat(item).where(linkId='patientId').answer.valueString }}",
"method": "PATCH"
},
"resource": {
"telecom": [{
"{% for item in QuestionnaireResponse.repeat(item).where(linkId='phone-group') %}": {
"system": "phone",
"use": "{{ %item.where(linkId='phone-type').answer.valueString }}",
"value": "{{ %item.where(linkId='phone-number').answer.valueString }}"
}
},
{
"{% for item in QuestionnaireResponse.repeat(item).where(linkId='email-group') %}": {
"system": "email",
"use": "{{ %item.where(linkId='email-type').answer.valueString }}",
"value": "{{ %item.where(linkId='email-number').answer.valueString }}"
}
},
{
"system": "other",
"use": "icq",
"value": "123321231"
}]
}
}]
} |
As an alternative approach we can use an extension, please check #4 for more details. |
I've added an additional explicit iteration logic using the
|
Use FHIRPath as a key for array:
https://github.com/beda-software/FHIRPathMappingLanguage/blob/main/examples/repeatable/fhirpathmap.json#L11
The text was updated successfully, but these errors were encountered: