I assumed the function signature and return type were already analyzed and discussed in the terminology-group meetings, the outcome being the document Terminology Server Invocation in AQL (SEC proposal). Looking to SM specs you mentioned, in relation with group proposals above, I see some good overlap:
I_TERMINOLOGY_SERVICE.value_set_validate(terminology_id, value_set_id, candidate_code) is conceptually related to
TERMINOLOGY('validate', terminology, set+code)
I_TERMINOLOGY_SERVICE.subsumes(terminology_id, ref_code, candidate_child_code) is conceptually related to
TERMINOLOGY('subsumes', terminology, codeA+codeB)
I_TERMINOLOGY_SERVICE.get_term(terminology_id, code, attributes) is conceptually related to
TERMINOLOGY('lookup', terminology, code+property)
I_TERMINOLOGY_SERVICE.get_value_set(terminology_id, value_set_code) is conceptually related to
TERMINOLOGY('expand', terminology, set)
So that mapping exercise you mention above is doable.
However, my question is more focused on AQL definition and use of this function. If it returns a set or a code, it could be used with a
matches operator, like the group also mentioned in the doc above. But, if it is returning boolean (like for ‘subsumes’, ‘validate’) it actually expected also data item code as input arguments, and
matches is not applicable anymore. In my opinion the WHERE clause will look like (conceptualy):
FROM ... CONTAINS ... c
TERMINOLOGY('subsumes', '...', 'system=...&codeA=...&codeB=[dataCode]')
where dataCode is a code from an identified path, e.g.
So my questions are:
- is my reasoning good (on calling this function without matches opperator)?
- how do you want to ‘inject’ the code there (pass the code as argument)?
I gave perhaps a silly solution above, using CONCAT(), but I have no clue what are the others thoughts on this, especially for those having a real AQL engine, like @matijap, @Seref or @heath.frankel , @birger.haarbrandt or @pablo, @bna. I need this feedback to continue on this JIRA issue.