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

Improvements for the I_DEFINITION_QUERY interface

REF: https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_definition_query_interface

Some suggestions for areas that can be improved:

1. Instead of list_all_queries(), name that function list_queries(). "all" implies something about the result that is not true, since the results will be paginated most of the time wont return "all" the existing queries.

2. Merge list_all_queries() and list_matching_queries() functions, having optional matcher parameters (id_pattern and artefact_id_pattern) on the list_queries function. Since the functionality with list_matching_queries(.*, .*, n, m) is the same as list_all_queries(n,m).

3. For list_xxxx change the names of the pagination parameters from "row"offset" and "rows_to_fetch" to something like offset/max or offset/page_number. The term "row" seems to imply a specific implementation. More generic names, and specific to the feature they provide, "pagination" in this case, are better IMO.

4. If there is a register_query_set() function, there should be also a get_query_set(), and maybe, execute_query_set(). I believe query sets will be registered with some purpose to bring many results that might be, for instance displayed together on the same GUI, for that an execute for all the queries on the query set might be useful to avoid running each query individually from the client.

These suggestions are related, but can be broken in many smaller tickets.



Thomas Beale


Pablo Pazos