{"action":"created","issue":{"url":"https://api.github.com/repos/ethercis/ethercis/issues/38","repository_url":"https://api.github.com/repos/ethercis/ethercis","labels_url":"https://api.github.com/repos/ethercis/ethercis/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/ethercis/ethercis/issues/38/comments","events_url":"https://api.github.com/repos/ethercis/ethercis/issues/38/events","html_url":"https://github.com/ethercis/ethercis/issues/38","id":245781436,"number":38,"title":"AQL resultset format for objects not pulling data back correctly.","user":{"login":"freshehr","id":1325125,"avatar_url":"https://avatars1.githubusercontent.com/u/1325125?v=4","gravatar_id":"","url":"https://api.github.com/users/freshehr","html_url":"https://github.com/freshehr","followers_url":"https://api.github.com/users/freshehr/followers","following_url":"https://api.github.com/users/freshehr/following{/other_user}","gists_url":"https://api.github.com/users/freshehr/gists{/gist_id}","starred_url":"https://api.github.com/users/freshehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freshehr/subscriptions","organizations_url":"https://api.github.com/users/freshehr/orgs","repos_url":"https://api.github.com/users/freshehr/repos","events_url":"https://api.github.com/users/freshehr/events{/privacy}","received_events_url":"https://api.github.com/users/freshehr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-26T16:31:30Z","updated_at":"2017-08-09T17:34:01Z","closed_at":"2017-08-09T17:34:01Z","body":"Hi all. The problem here is not the AQL. I am pretty sure that the issue is that the 'raw' openEHR json coming back from Ethercis is not quite correct. @\r\n\r\nThe comment that is messing Rob up is actually associated with an individual result, not with the whole panel (though there can be a separate element for that, which we do use at times). The problem is that there is a chunk of json essentially missing. I did try to explain that in the other thread.\r\n\r\nThis\r\n```\r\n[{\r\n\"name\": {\r\n\"value\": \"Laboratory result\"\r\n},\r\n\"items\": [{\r\n\"name\": {\r\n\"value\": \"Comment\"\r\n},\r\n\"value\": {\r\n\"value\": \"singificantly raised level\"\r\n},\r\n\"@Class\": \"DV_TEXT\",\r\n\"archetype_node_id\": \"at0003\"\r\n}],\r\n\"archetype_node_id\": \"at0002\"\r\n},\r\n```\r\n\r\nshould be \r\n\r\n```\r\n\"items\": [\r\n        {\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_CODED_TEXT\",\r\n                                    \"value\": \"Total HDL\",\r\n                                    \"defining_code\": {\r\n                                        \"@class\": \"CODE_PHRASE\",\r\n                                        \"terminology_id\": {\r\n                                            \"@class\": \"TERMINOLOGY_ID\",\r\n                                            \"value\": \"SNOMED-CT\"\r\n                                        },\r\n                                        \"code_string\": \"71006\"\r\n                                    }\r\n                                },\r\n                                \"archetype_node_id\": \"at0001\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_QUANTITY\",\r\n                                    \"normal_range\": {\r\n                                        \"@class\": \"DV_INTERVAL\",\r\n                                        \"lower\": {\r\n                                            \"@class\": \"DV_QUANTITY\",\r\n                                            \"magnitude\": 80,\r\n                                            \"units\": \"mmol/l\"\r\n                                        },\r\n                                        \"upper\": {\r\n                                            \"@class\": \"DV_QUANTITY\",\r\n                                            \"magnitude\": 110,\r\n                                            \"units\": \"mmol/l\"\r\n                                        },\r\n                                        \"lower_unbounded\": false,\r\n                                        \"upper_unbounded\": false\r\n                                    },\r\n                                    \"magnitude\": 123,\r\n                                    \"units\": \"mmol/l\",                                        \r\n                                }\r\n                            },\r\n                            {\r\n                              \"archetype_node_id\": \"at0003\",\r\n                              \"name\": {\r\n                                \"value\": \"Comment\"\r\n                                },\r\n                              \"value\": {\r\n                                \"value\": \"singificantly raised level\"\r\n                              }\r\n                            }\r\n                        ]\r\n``` \r\n\r\nSee https://github.com/RippleOSI/Ripple-openEHR/issues/8#issuecomment-312304163 for full discussion.\r\n"},"comment":{"url":"https://api.github.com/repos/ethercis/ethercis/issues/comments/321326256","html_url":"https://github.com/ethercis/ethercis/issues/38#issuecomment-321326256","issue_url":"https://api.github.com/repos/ethercis/ethercis/issues/38","id":321326256,"user":{"login":"freshehr","id":1325125,"avatar_url":"https://avatars1.githubusercontent.com/u/1325125?v=4","gravatar_id":"","url":"https://api.github.com/users/freshehr","html_url":"https://github.com/freshehr","followers_url":"https://api.github.com/users/freshehr/followers","following_url":"https://api.github.com/users/freshehr/following{/other_user}","gists_url":"https://api.github.com/users/freshehr/gists{/gist_id}","starred_url":"https://api.github.com/users/freshehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freshehr/subscriptions","organizations_url":"https://api.github.com/users/freshehr/orgs","repos_url":"https://api.github.com/users/freshehr/repos","events_url":"https://api.github.com/users/freshehr/events{/privacy}","received_events_url":"https://api.github.com/users/freshehr/received_events","type":"User","site_admin":false},"created_at":"2017-08-09T17:34:01Z","updated_at":"2017-08-09T17:34:01Z","body":"Thanks CC!!\r\n\r\nCan we add the archetype_node_id at root archetype level as this will make it easier to navigate and further process the structure\r\ne.g.\r\n```\r\n \"conclusion\": \"Rapidly deteriorating renal function\",\r\n            \"uid\": \"1d27906b-ebc7-4848-9f1b-73187ee4f72e::vm01.ethercis.org::1\",\r\n            \"test_panel\": {\r\n                 \r\n                    \"value\": \"Laboratory test panel\"\r\n                },\r\n\"conclusion\": \"Rapidly deteriorating renal function\",\r\n            \"uid\": \"1d27906b-ebc7-4848-9f1b-73187ee4f72e::vm01.ethercis.org::1\",\r\n            \"test_panel\": {\r\n                \"name\": {\r\n                    \"value\": \"Laboratory test panel\"\r\n                },\r\n             \"archetype_node_id\": \"openEHR-EHR-CLUSTER.laboratory_panel.v0\",\r\n              \"items\": [\r\n                    {\r\n                        \"archetype_node_id\": \"at0002\",\r\n                        \"name\": {\r\n                            \"value\": \"Laboratory result\"\r\n                        },\r\n                        \"items\": [\r\n```"}}
{"actor":{"display_login":"freshehr"}}