Hi all,
I have mentioned in the last SEC meeting the need of adding some archetype_id information in the columns because the paths alone are not enough info to know what the data in the row columns are.
So for instance, in EHRBASE we have something like:
{
"q": "SELECT o, eval, i FROM EHR e[...] contains composition c contains observation o[...]
OR evaluation eval[...] OR instruction i[...]",
"columns": [
{
"path": "/",
"name": "#0"
},
{
"path": "/",
"name": "#1"
},
{
"path": "/",
"name": "#2"
}
],
"rows": [
[
Clients actually need to know the query projections to process the result correctly, because all the columns have path /
My proposal was to add to archetype id since the path is relative to the archetype root, these are different ways of doing the same:
- absolute path:
"columns": [
{
"path": "openEHR-EHR-OBSERVATION.../",
"name": "#0"
},
{
"path": "openEHR-EHR-EVALUATION.../",
"name": "#1"
},
{
"path": "openEHR-EHR-INSTRUCTION.../",
"name": "#2"
}
- archetype_id and path:
"columns": [
{
"archetype_id": "openEHR-EHR-OBSERVATION",
"path": "/",
"name": "#0"
},
{
"archetype_id": "openEHR-EHR-EVALUATION",
"path": "/",
"name": "#1"
},
{
"archetype_id": "openEHR-EHR-INSTRUCTION",
"path": "/",
"name": "#2"
}
- archetype_id, variable and path:
"columns": [
{
"o": "openEHR-EHR-OBSERVATION",
"path": "o/",
"name": "#0"
},
{
"evail": "openEHR-EHR-EVALUATION",
"path": "eval/",
"name": "#1"
},
{
"i": "openEHR-EHR-INSTRUCTION",
"path": "i/",
"name": "#2"
}
Which do you think would be the best proposal?