We're updating the issue view to help you get more done.Learn more

Change LOCATABLE.item_at_path to return ANY

ItemAtPath is only intended to work with (return) Locatable objects but we obviously
need to support other Reference Model attributes using paths as well such as
context/health_care_facility and items[at0009]/value. Do we need to change ItemAtPath
to return an Object rather than LOCATABLE or provide a different method for retrieving
DataValue objects such as ValueAtPath? Providing support for returning DataValue objects
will cover a fair amount of the querying requirements but there may still be objects
that are not a DataValue such as PARTY_PROXY or OBJECT_REF.

Status

Assignee

JeffJ

Reporter

Heath Frankel

Change Description

Changes made: Change LOCATABLE.item_at_path() to return ANY, rather than LOCATABLE. This accommodates all openEHR types as well as all built-in types, according to the openEHR type system. Alternative that were explored: An alternative was to add a new function that does this - in the interests of not impacting the existing function. But formally speaking the existing function is not correct: its input (domain) is "paths", and its output (range) is LOCATABLEs, yet clearly there are legitimate paths that point to things other than LOCATABLEs.

Approved By

ARB

Components

Fix versions

Priority

Minor