# I can't access to cluster's attributes **Category:** [Platform](https://discourse.openehr.org/c/platform-implem/7) **Created:** 2023-03-07 09:45 UTC **Views:** 390 **Replies:** 4 **URL:** https://discourse.openehr.org/t/i-cant-access-to-clusters-attributes/3655 --- ## Post #1 by @Alex_Paris Hi! I'm using PostMan in order to create a composition with different observations and instructions, and the creation of the composition it's ok, all attributes that I set were created, but when I try to execute an aql query in order to get some attributes of a cluster that it's an attribute of an instruction, i don't know why it seems as it doesn't exists by the path I'm giving to the aql query, because the path it's correct. This is the instruction that i'm creating: { "_type" : "INSTRUCTION", "archetype_node_id" : "openEHR-EHR-INSTRUCTION.peticio_de_test_covid.v0", "archetype_details":{ "archetype_id":{ "value":"openEHR-EHR-INSTRUCTION.peticio_de_test_covid.v0" }, "rm_version":"1.0.2" }, "name" : { "value" : "Peticio test COVID" }, "narrative" : { "value" : "PETICIO TEST COVID" }, "language" : { "terminology_id" : { "value" : "ISO_639-1" }, "code_string" : "en" }, "encoding" : { "terminology_id" : { "value" : "IANA_character-sets" }, "code_string" : "UTF-8" }, "subject" : { "_type" : "PARTY_SELF" }, "activities" : { "archetype_node_id" : "at0001", "name" : { "value" : "Current Activity" }, "description" : { "_type" : "ITEM_TREE", "archetype_node_id" : "at0002", "name" : { "value" : "Tree" }, "items" : [ { "_type" : "ELEMENT", "archetype_node_id" : "at0003", "name" : { "_type" : "DV_TEXT", "value" : "Tipus de prova" }, "value" : { "_type" : "DV_TEXT", "value" : "test PCR" } }, { "_type" : "ELEMENT", "archetype_node_id" : "at0004", "name" : { "_type" : "DV_TEXT", "value" : "Data de demanda" }, "value" : { "_type" : "DV_DATE", "value" : "2023-02-28" } },{ "_type" : "ELEMENT", "archetype_node_id" : "at0005", "name" : { "_type" : "DV_TEXT", "value" : "Numero de ordre clinica" }, "value" : { "_type" : "DV_TEXT", "value" : "967" } },{ "_type":"CLUSTER", "archetype_node_id" : "at0010", "name" : { "value" : "Identificacio CENTRE" }, "items":[ { "_type" : "ELEMENT", "archetype_node_id" : "at0002", "name" : { "_type" : "DV_TEXT", "value" : "EP" }, "value" : { "_type" : "DV_TEXT", "value" : "0664" } }, { "_type" : "ELEMENT", "archetype_node_id" : "at0003", "name" : { "_type" : "DV_TEXT", "value" : "UP" }, "value" : { "_type" : "DV_TEXT", "value" : "08172" } }, { "_type" : "ELEMENT", "archetype_node_id" : "at0004", "name" : { "_type" : "DV_TEXT", "value" : "Centre" }, "value" : { "_type" : "DV_TEXT", "value" : "E08027605" } } ] },{ "_type":"CLUSTER", "archetype_node_id" : "at0011", "name" : { "value" : "Identificacio LABO" }, "items":[ { "_type" : "ELEMENT", "archetype_node_id" : "at0002", "name" : { "_type" : "DV_TEXT", "value" : "EP" }, "value" : { "_type" : "DV_TEXT", "value" : "2303" } }, { "_type" : "ELEMENT", "archetype_node_id" : "at0003", "name" : { "_type" : "DV_TEXT", "value" : "UP" }, "value" : { "_type" : "DV_TEXT", "value" : "34564" } }, { "_type" : "ELEMENT", "archetype_node_id" : "at0004", "name" : { "_type" : "DV_TEXT", "value" : "Centre" }, "value" : { "_type" : "DV_TEXT", "value" : "E08027606" } } ] }, { "_type" : "ELEMENT", "archetype_node_id" : "at0012", "name" : { "_type" : "DV_TEXT", "value" : "Nom metge" }, "value" : { "_type" : "DV_TEXT", "value" : "Alex Paris Ferrer" } },{ "_type" : "ELEMENT", "archetype_node_id" : "at0013", "name" : { "_type" : "DV_TEXT", "value" : "Num colegiat" }, "value" : { "_type" : "DV_IDENTIFIER", "id" : "12345678X" } }] } And with this query I get the complete cluster with all attributes: query: "SELECT e/ehr_id/value, i/activities[at0001]/description[at0002]/items[at0010] FROM EHR e CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.sospitos_covid.v0] CONTAINS INSTRUCTION i[openEHR-EHR-INSTRUCTION.peticio_de_test_covid.v0]" And I get all the cluster. response: ""name": { "value": "Identificacio CENTRE", "_type": "DV_TEXT" }, "archetype_node_id": "at0010", "_type": "CLUSTER", "items": [ { "name": { "value": "EP", "_type": "DV_TEXT" }, "value": { "_type": "DV_TEXT", "value": "0664" }, "_type": "ELEMENT", "archetype_node_id": "at0002" }, { "name": { "value": "UP", "_type": "DV_TEXT" }, "value": { "_type": "DV_TEXT", "value": "08172" }, "_type": "ELEMENT", "archetype_node_id": "at0003" }, { "name": { "value": "Centre", "_type": "DV_TEXT" }, "value": { "_type": "DV_TEXT", "value": "E08027605" }, "_type": "ELEMENT", "archetype_node_id": "at0004" } ] }" But when I'm trying to acces to one particular attribute of the cluster for example the element with id = at0004: query: "SELECT e/ehr_id/value, i/activities[at0001]/description[at0002]/items[at0010]/items[at0004] FROM EHR e CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.sospitos_covid.v0] CONTAINS INSTRUCTION i[openEHR-EHR-INSTRUCTION.peticio_de_test_covid.v0]" This error occurs, it seems as the path it's incorrect or if the element doesn't exists, but the path it's correct, and the element was correctly created: response: "error": "Bad Request", "message": "Field (/ehr_id/value) is not contained in Row (1)" --- ## Post #2 by @ian.mcnicoll This looks like a bug to me Alex and you should report to Ehrbase as this looks like legal AQL to me. --- ## Post #3 by @Alex_Paris Yes, it's very strange. Okey, thanks Ian! --- ## Post #4 by @admin.in2 Hi Ian, Do you know how to report it to the EHRbase team? Out of discourse we do not have any other way to do it. Kind regards --- ## Post #5 by @ian.mcnicoll [EhrBase Github Issues](https://github.com/ehrbase/ehrbase/issues) --- **Canonical:** https://discourse.openehr.org/t/i-cant-access-to-clusters-attributes/3655 **Original content:** https://discourse.openehr.org/t/i-cant-access-to-clusters-attributes/3655