-
Notifications
You must be signed in to change notification settings - Fork 0
Description
IS:
Currently Torch converts the element id from the crtdl directly into fhir path which returns a list of found elements.
When handling list subelements the relation inside this list is not guaranteed.
E.g. Observation.component.intepretation and Observation.component.code would be separated in the current version.
SHOULD:
TORCH should copy elements while keeping the relationships or grouping of subelements in place.
-
Build tree with each node being the fhir path to the next field.
-
execute fhir path along the tree i.e. recursive copy:
- Extract node element with Fhir Path
- If node has children recursively extract them with subfhirpaths
- return element
Considerations: Slicing discriminators work strictly "downward" i.e. on a relative path starting at element level.
Note that its possible to have a reference resolve and on top choose the reference as normal field / include it from a different attribute.
e.g.
{
"attributeRef": "Encounter.diagnosis",
"mustHave": false,
},
{
"attributeRef": "Encounter.diagnosis.use",
"mustHave": false,
},
{
"attributeRef": "Encounter.diagnosis.condition",
"mustHave": false,
"linkedGroups": ["diags"]
}