AQL query API - Add Datatype to Columns

Description

It would be helpful to get the datatype of each column in the query API response to make it more developer friendly and handle the datatype correctly in the code. Otherwise we must handle everything as strings.

 

Example of adding "type": "DV_DATE_TIME" in the objects of Columns.

Attachments

2

Activity

Show:

Ian McNicoll April 8, 2024 at 12:18 PM

I agree with suggestion to change the AQL to expose the related datatype - can we close this?

Erik Sundvall March 27, 2023 at 3:25 PM
Edited

If it would be enough to get the data types in the cells (sub-parts of rows) then that may often be achieved by modifying the AQL query to be less specific (see Puls_mag vs the less specific Pulsfrekvens or BP_combo in examples below) and thus include more of the surrounding object structure that usually includes data type information.

Adding type to column header can be a bit tricky in the cases where the response in the column may be if mixed/varying types, but would be possible if an openEHR-RM-aware analysis is done on the results in the column and the data type is set to the least common denominator in the RM inherinace hierarchy.

An alternative is to handle RM-objects of any kind at the UI level or other middleware just like Better EHR Studio does, see the table representations of the same result below.


Compact:

Detailed:

“Raw” a format by Better that in e.g. seems to be preferred by some UI programmers over the standard table-like REST response in

Details

Reporter

Components

Priority

Created March 27, 2023 at 10:01 AM
Updated April 8, 2024 at 12:18 PM