{"action":"created","issue":{"url":"https://api.github.com/repos/ethercis/ethercis/issues/73","repository_url":"https://api.github.com/repos/ethercis/ethercis","labels_url":"https://api.github.com/repos/ethercis/ethercis/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/ethercis/ethercis/issues/73/comments","events_url":"https://api.github.com/repos/ethercis/ethercis/issues/73/events","html_url":"https://github.com/ethercis/ethercis/issues/73","id":273714340,"number":73,"title":"Support for raw JSON compostions from AQL","user":{"login":"robtweed","id":424546,"avatar_url":"https://avatars0.githubusercontent.com/u/424546?v=4","gravatar_id":"","url":"https://api.github.com/users/robtweed","html_url":"https://github.com/robtweed","followers_url":"https://api.github.com/users/robtweed/followers","following_url":"https://api.github.com/users/robtweed/following{/other_user}","gists_url":"https://api.github.com/users/robtweed/gists{/gist_id}","starred_url":"https://api.github.com/users/robtweed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robtweed/subscriptions","organizations_url":"https://api.github.com/users/robtweed/orgs","repos_url":"https://api.github.com/users/robtweed/repos","events_url":"https://api.github.com/users/robtweed/events{/privacy}","received_events_url":"https://api.github.com/users/robtweed/received_events","type":"User","site_admin":false},"labels":[{"id":279033479,"url":"https://api.github.com/repos/ethercis/ethercis/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-14T09:03:52Z","updated_at":"2017-11-16T18:00:25Z","closed_at":null,"author_association":"NONE","body":"In Marand, you can make a \"top-level\" AQL request, eg:\r\n\r\n{\"aql\":\"select a as dara from EHR e[ehr_id/value='cd8abecd-9925-4313-86af-93aab4930eae'] contains COMPOSITION a [openEHR-EHR-COMPOSITION.adverse_reaction_list.v1] where a/name/value='Adverse reaction list'\"}\r\n\r\nThis returns a resultset containing the full set of data for each composition for the specified template and specified patient, in \"RAW JSON\" format.\r\n\r\nCould this capability please be added to EtherCIS? It will play a key role in being able to easily and simply cross-convert between the various JSON formats used by and needed from the QEWD-Ripple middle tier\r\n\r\nThanks\r\nRob\r\n\r\n============\r\n\r\nExample of response from Marand for the AQL above:\r\n\r\n```\r\n{\r\n    \"meta\": {\r\n        \"href\": \"http://test.operon.systems/rest/v1/query/?aql=select%20a%20as%20data%20from%20EHR%20e%5Behr_id/value%3D'dabcbf61-94bb-45df-a472-9c7a489a200d'%5D%20contains%20COMPOSITION%20a%5BopenEHR-EHR-COMPOSITION.adverse_reaction_list.v1%5Dwhere%20a/name/value%3D'Adverse%20reaction%20list'\"\r\n    },\r\n    \"aql\": \"select a as data from EHR e[ehr_id/value='dabcbf61-94bb-45df-a472-9c7a489a200d'] contains COMPOSITION a[openEHR-EHR-COMPOSITION.adverse_reaction_list.v1]where a/name/value='Adverse reaction list'\",\r\n    \"executedAql\": \"select a as data from EHR e[ehr_id/value='dabcbf61-94bb-45df-a472-9c7a489a200d'] contains COMPOSITION a[openEHR-EHR-COMPOSITION.adverse_reaction_list.v1]where a/name/value='Adverse reaction list'\",\r\n    \"resultSet\": [{\r\n        \"data\": {\r\n            \"@class\": \"COMPOSITION\",\r\n            \"name\": {\r\n                \"@class\": \"DV_TEXT\",\r\n                \"value\": \"Adverse reaction list\"\r\n            },\r\n            \"uid\": {\r\n                \"@class\": \"OBJECT_VERSION_ID\",\r\n                \"value\": \"9809c9bd-daca-4a6d-8a7f-e78fc947af8c::hcbox.oprn.ehrscape.com::1\"\r\n            },\r\n            \"archetype_details\": {\r\n                \"@class\": \"ARCHETYPED\",\r\n                \"archetype_id\": {\r\n                    \"@class\": \"ARCHETYPE_ID\",\r\n                    \"value\": \"openEHR-EHR-COMPOSITION.adverse_reaction_list.v1\"\r\n                },\r\n                \"template_id\": {\r\n                    \"@class\": \"TEMPLATE_ID\",\r\n                    \"value\": \"IDCR - Adverse Reaction List.v1\"\r\n                },\r\n                \"rm_version\": \"1.0.1\"\r\n            },\r\n            \"archetype_node_id\": \"openEHR-EHR-COMPOSITION.adverse_reaction_list.v1\",\r\n            \"language\": {\r\n                \"@class\": \"CODE_PHRASE\",\r\n                \"terminology_id\": {\r\n                    \"@class\": \"TERMINOLOGY_ID\",\r\n                    \"value\": \"ISO_639-1\"\r\n                },\r\n                \"code_string\": \"en\"\r\n            },\r\n            \"territory\": {\r\n                \"@class\": \"CODE_PHRASE\",\r\n                \"terminology_id\": {\r\n                    \"@class\": \"TERMINOLOGY_ID\",\r\n                    \"value\": \"ISO_3166-1\"\r\n                },\r\n                \"code_string\": \"GB\"\r\n            },\r\n            \"category\": {\r\n                \"@class\": \"DV_CODED_TEXT\",\r\n                \"value\": \"event\",\r\n                \"defining_code\": {\r\n                    \"@class\": \"CODE_PHRASE\",\r\n                    \"terminology_id\": {\r\n                        \"@class\": \"TERMINOLOGY_ID\",\r\n                        \"value\": \"openehr\"\r\n                    },\r\n                    \"code_string\": \"433\"\r\n                }\r\n            },\r\n            \"composer\": {\r\n                \"@class\": \"PARTY_IDENTIFIED\",\r\n                \"name\": \"Dr Ian Shannon\"\r\n            },\r\n            \"context\": {\r\n                \"@class\": \"EVENT_CONTEXT\",\r\n                \"start_time\": {\r\n                    \"@class\": \"DV_DATE_TIME\",\r\n                    \"value\": \"2016-12-20T00:11:02.518+02:00\"\r\n                },\r\n                \"setting\": {\r\n                    \"@class\": \"DV_CODED_TEXT\",\r\n                    \"value\": \"other care\",\r\n                    \"defining_code\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"openehr\"\r\n                        },\r\n                        \"code_string\": \"238\"\r\n                    }\r\n                },\r\n                \"health_care_facility\": {\r\n                    \"@class\": \"PARTY_IDENTIFIED\",\r\n                    \"external_ref\": {\r\n                        \"@class\": \"PARTY_REF\",\r\n                        \"id\": {\r\n                            \"@class\": \"GENERIC_ID\",\r\n                            \"value\": \"999999-345\",\r\n                            \"scheme\": \"2.16.840.1.113883.2.1.4.3\"\r\n                        },\r\n                        \"namespace\": \"NHS-UK\",\r\n                        \"type\": \"PARTY\"\r\n                    },\r\n                    \"name\": \"Home\"\r\n                }\r\n            },\r\n            \"content\": [{\r\n                \"@class\": \"SECTION\",\r\n                \"name\": {\r\n                    \"@class\": \"DV_TEXT\",\r\n                    \"value\": \"Allergies and adverse reactions\"\r\n                },\r\n                \"archetype_details\": {\r\n                    \"@class\": \"ARCHETYPED\",\r\n                    \"archetype_id\": {\r\n                        \"@class\": \"ARCHETYPE_ID\",\r\n                        \"value\": \"openEHR-EHR-SECTION.allergies_adverse_reactions_rcp.v1\"\r\n                    },\r\n                    \"rm_version\": \"1.0.1\"\r\n                },\r\n                \"archetype_node_id\": \"openEHR-EHR-SECTION.allergies_adverse_reactions_rcp.v1\",\r\n                \"items\": [{\r\n                    \"@class\": \"EVALUATION\",\r\n                    \"name\": {\r\n                        \"@class\": \"DV_TEXT\",\r\n                        \"value\": \"Adverse reaction risk\"\r\n                    },\r\n                    \"archetype_details\": {\r\n                        \"@class\": \"ARCHETYPED\",\r\n                        \"archetype_id\": {\r\n                            \"@class\": \"ARCHETYPE_ID\",\r\n                            \"value\": \"openEHR-EHR-EVALUATION.adverse_reaction_risk.v1\"\r\n                        },\r\n                        \"rm_version\": \"1.0.1\"\r\n                    },\r\n                    \"archetype_node_id\": \"openEHR-EHR-EVALUATION.adverse_reaction_risk.v1\",\r\n                    \"language\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"ISO_639-1\"\r\n                        },\r\n                        \"code_string\": \"en\"\r\n                    },\r\n                    \"encoding\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"IANA_character-sets\"\r\n                        },\r\n                        \"code_string\": \"UTF-8\"\r\n                    },\r\n                    \"subject\": {\r\n                        \"@class\": \"PARTY_SELF\"\r\n                    },\r\n                    \"data\": {\r\n                        \"@class\": \"ITEM_TREE\",\r\n                        \"name\": {\r\n                            \"@class\": \"DV_TEXT\",\r\n                            \"value\": \"Tree\"\r\n                        },\r\n                        \"archetype_node_id\": \"at0001\",\r\n                        \"items\": [{\r\n                            \"@class\": \"ELEMENT\",\r\n                            \"name\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Causative agent\"\r\n                            },\r\n                            \"archetype_node_id\": \"at0002\",\r\n                            \"value\": {\r\n                                \"@class\": \"DV_CODED_TEXT\",\r\n                                \"value\": \"allergy to penicillin\",\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\": \"91936005\"\r\n                                }\r\n                            }\r\n                        }, {\r\n                            \"@class\": \"CLUSTER\",\r\n                            \"name\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Reaction details\"\r\n                            },\r\n                            \"archetype_node_id\": \"at0009\",\r\n                            \"items\": [{\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Manifestation\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0011\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_CODED_TEXT\",\r\n                                    \"value\": \"eruption due to drug\",\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\": \"28926001\"\r\n                                    }\r\n                                }\r\n                            }, {\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Comment\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0032\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"History unclear\"\r\n                                }\r\n                            }]\r\n                        }]\r\n                    }\r\n                }, {\r\n                    \"@class\": \"EVALUATION\",\r\n                    \"name\": {\r\n                        \"@class\": \"DV_TEXT\",\r\n                        \"value\": \"Adverse reaction risk #2\"\r\n                    },\r\n                    \"archetype_details\": {\r\n                        \"@class\": \"ARCHETYPED\",\r\n                        \"archetype_id\": {\r\n                            \"@class\": \"ARCHETYPE_ID\",\r\n                            \"value\": \"openEHR-EHR-EVALUATION.adverse_reaction_risk.v1\"\r\n                        },\r\n                        \"rm_version\": \"1.0.1\"\r\n                    },\r\n                    \"archetype_node_id\": \"openEHR-EHR-EVALUATION.adverse_reaction_risk.v1\",\r\n                    \"language\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"ISO_639-1\"\r\n                        },\r\n                        \"code_string\": \"en\"\r\n                    },\r\n                    \"encoding\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"IANA_character-sets\"\r\n                        },\r\n                        \"code_string\": \"UTF-8\"\r\n                    },\r\n                    \"subject\": {\r\n                        \"@class\": \"PARTY_SELF\"\r\n                    },\r\n                    \"data\": {\r\n                        \"@class\": \"ITEM_TREE\",\r\n                        \"name\": {\r\n                            \"@class\": \"DV_TEXT\",\r\n                            \"value\": \"Tree\"\r\n                        },\r\n                        \"archetype_node_id\": \"at0001\",\r\n                        \"items\": [{\r\n                            \"@class\": \"ELEMENT\",\r\n                            \"name\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Causative agent\"\r\n                            },\r\n                            \"archetype_node_id\": \"at0002\",\r\n                            \"value\": {\r\n                                \"@class\": \"DV_CODED_TEXT\",\r\n                                \"value\": \"allergy to seafood\",\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\": \"91937001\"\r\n                                }\r\n                            }\r\n                        }, {\r\n                            \"@class\": \"CLUSTER\",\r\n                            \"name\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Reaction details\"\r\n                            },\r\n                            \"archetype_node_id\": \"at0009\",\r\n                            \"items\": [{\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Manifestation\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0011\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_CODED_TEXT\",\r\n                                    \"value\": \"allergic angio-oedema due to ingested food\",\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\": \"402388007\"\r\n                                    }\r\n                                }\r\n                            }, {\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Comment\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0032\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"observed by clinician\"\r\n                                }\r\n                            }]\r\n                        }]\r\n                    }\r\n                }]\r\n            }]\r\n        }\r\n    }, {\r\n        \"data\": {\r\n            \"@class\": \"COMPOSITION\",\r\n            \"name\": {\r\n                \"@class\": \"DV_TEXT\",\r\n                \"value\": \"Adverse reaction list\"\r\n            },\r\n            \"uid\": {\r\n                \"@class\": \"OBJECT_VERSION_ID\",\r\n                \"value\": \"91a65e46-e6f3-44a6-bfc8-a4fd6c45f815::hcbox.oprn.ehrscape.com::1\"\r\n            },\r\n            \"archetype_details\": {\r\n                \"@class\": \"ARCHETYPED\",\r\n                \"archetype_id\": {\r\n                    \"@class\": \"ARCHETYPE_ID\",\r\n                    \"value\": \"openEHR-EHR-COMPOSITION.adverse_reaction_list.v1\"\r\n                },\r\n                \"template_id\": {\r\n                    \"@class\": \"TEMPLATE_ID\",\r\n                    \"value\": \"IDCR - Adverse Reaction List.v1\"\r\n                },\r\n                \"rm_version\": \"1.0.1\"\r\n            },\r\n            \"archetype_node_id\": \"openEHR-EHR-COMPOSITION.adverse_reaction_list.v1\",\r\n            \"language\": {\r\n                \"@class\": \"CODE_PHRASE\",\r\n                \"terminology_id\": {\r\n                    \"@class\": \"TERMINOLOGY_ID\",\r\n                    \"value\": \"ISO_639-1\"\r\n                },\r\n                \"code_string\": \"en\"\r\n            },\r\n            \"territory\": {\r\n                \"@class\": \"CODE_PHRASE\",\r\n                \"terminology_id\": {\r\n                    \"@class\": \"TERMINOLOGY_ID\",\r\n                    \"value\": \"ISO_3166-1\"\r\n                },\r\n                \"code_string\": \"GB\"\r\n            },\r\n            \"category\": {\r\n                \"@class\": \"DV_CODED_TEXT\",\r\n                \"value\": \"event\",\r\n                \"defining_code\": {\r\n                    \"@class\": \"CODE_PHRASE\",\r\n                    \"terminology_id\": {\r\n                        \"@class\": \"TERMINOLOGY_ID\",\r\n                        \"value\": \"openehr\"\r\n                    },\r\n                    \"code_string\": \"433\"\r\n                }\r\n            },\r\n            \"composer\": {\r\n                \"@class\": \"PARTY_IDENTIFIED\",\r\n                \"name\": \"Dr Ian Shannon\"\r\n            },\r\n            \"context\": {\r\n                \"@class\": \"EVENT_CONTEXT\",\r\n                \"start_time\": {\r\n                    \"@class\": \"DV_DATE_TIME\",\r\n                    \"value\": \"2016-12-20T00:11:02.518+02:00\"\r\n                },\r\n                \"setting\": {\r\n                    \"@class\": \"DV_CODED_TEXT\",\r\n                    \"value\": \"other care\",\r\n                    \"defining_code\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"openehr\"\r\n                        },\r\n                        \"code_string\": \"238\"\r\n                    }\r\n                },\r\n                \"health_care_facility\": {\r\n                    \"@class\": \"PARTY_IDENTIFIED\",\r\n                    \"external_ref\": {\r\n                        \"@class\": \"PARTY_REF\",\r\n                        \"id\": {\r\n                            \"@class\": \"GENERIC_ID\",\r\n                            \"value\": \"999999-345\",\r\n                            \"scheme\": \"2.16.840.1.113883.2.1.4.3\"\r\n                        },\r\n                        \"namespace\": \"NHS-UK\",\r\n                        \"type\": \"PARTY\"\r\n                    },\r\n                    \"name\": \"Home\"\r\n                }\r\n            },\r\n            \"content\": [{\r\n                \"@class\": \"SECTION\",\r\n                \"name\": {\r\n                    \"@class\": \"DV_TEXT\",\r\n                    \"value\": \"Allergies and adverse reactions\"\r\n                },\r\n                \"archetype_details\": {\r\n                    \"@class\": \"ARCHETYPED\",\r\n                    \"archetype_id\": {\r\n                        \"@class\": \"ARCHETYPE_ID\",\r\n                        \"value\": \"openEHR-EHR-SECTION.allergies_adverse_reactions_rcp.v1\"\r\n                    },\r\n                    \"rm_version\": \"1.0.1\"\r\n                },\r\n                \"archetype_node_id\": \"openEHR-EHR-SECTION.allergies_adverse_reactions_rcp.v1\",\r\n                \"items\": [{\r\n                    \"@class\": \"EVALUATION\",\r\n                    \"name\": {\r\n                        \"@class\": \"DV_TEXT\",\r\n                        \"value\": \"Adverse reaction risk\"\r\n                    },\r\n                    \"archetype_details\": {\r\n                        \"@class\": \"ARCHETYPED\",\r\n                        \"archetype_id\": {\r\n                            \"@class\": \"ARCHETYPE_ID\",\r\n                            \"value\": \"openEHR-EHR-EVALUATION.adverse_reaction_risk.v1\"\r\n                        },\r\n                        \"rm_version\": \"1.0.1\"\r\n                    },\r\n                    \"archetype_node_id\": \"openEHR-EHR-EVALUATION.adverse_reaction_risk.v1\",\r\n                    \"language\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"ISO_639-1\"\r\n                        },\r\n                        \"code_string\": \"en\"\r\n                    },\r\n                    \"encoding\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"IANA_character-sets\"\r\n                        },\r\n                        \"code_string\": \"UTF-8\"\r\n                    },\r\n                    \"subject\": {\r\n                        \"@class\": \"PARTY_SELF\"\r\n                    },\r\n                    \"data\": {\r\n                        \"@class\": \"ITEM_TREE\",\r\n                        \"name\": {\r\n                            \"@class\": \"DV_TEXT\",\r\n                            \"value\": \"Tree\"\r\n                        },\r\n                        \"archetype_node_id\": \"at0001\",\r\n                        \"items\": [{\r\n                            \"@class\": \"ELEMENT\",\r\n                            \"name\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Causative agent\"\r\n                            },\r\n                            \"archetype_node_id\": \"at0002\",\r\n                            \"value\": {\r\n                                \"@class\": \"DV_CODED_TEXT\",\r\n                                \"value\": \"allergy to penicillin\",\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\": \"91936005\"\r\n                                }\r\n                            }\r\n                        }, {\r\n                            \"@class\": \"CLUSTER\",\r\n                            \"name\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Reaction details\"\r\n                            },\r\n                            \"archetype_node_id\": \"at0009\",\r\n                            \"items\": [{\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Manifestation\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0011\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_CODED_TEXT\",\r\n                                    \"value\": \"eruption due to drug\",\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\": \"28926001\"\r\n                                    }\r\n                                }\r\n                            }, {\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Comment\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0032\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"History unclear\"\r\n                                }\r\n                            }]\r\n                        }]\r\n                    }\r\n                }]\r\n            }]\r\n        }\r\n    }, {\r\n        \"data\": {\r\n            \"@class\": \"COMPOSITION\",\r\n            \"name\": {\r\n                \"@class\": \"DV_TEXT\",\r\n                \"value\": \"Adverse reaction list\"\r\n            },\r\n            \"uid\": {\r\n                \"@class\": \"OBJECT_VERSION_ID\",\r\n                \"value\": \"6fe4570a-8e49-4a37-9905-26f4a57368b3::hcbox.oprn.ehrscape.com::1\"\r\n            },\r\n            \"archetype_details\": {\r\n                \"@class\": \"ARCHETYPED\",\r\n                \"archetype_id\": {\r\n                    \"@class\": \"ARCHETYPE_ID\",\r\n                    \"value\": \"openEHR-EHR-COMPOSITION.adverse_reaction_list.v1\"\r\n                },\r\n                \"template_id\": {\r\n                    \"@class\": \"TEMPLATE_ID\",\r\n                    \"value\": \"IDCR - Adverse Reaction List.v1\"\r\n                },\r\n                \"rm_version\": \"1.0.1\"\r\n            },\r\n            \"archetype_node_id\": \"openEHR-EHR-COMPOSITION.adverse_reaction_list.v1\",\r\n            \"language\": {\r\n                \"@class\": \"CODE_PHRASE\",\r\n                \"terminology_id\": {\r\n                    \"@class\": \"TERMINOLOGY_ID\",\r\n                    \"value\": \"ISO_639-1\"\r\n                },\r\n                \"code_string\": \"en\"\r\n            },\r\n            \"territory\": {\r\n                \"@class\": \"CODE_PHRASE\",\r\n                \"terminology_id\": {\r\n                    \"@class\": \"TERMINOLOGY_ID\",\r\n                    \"value\": \"ISO_3166-1\"\r\n                },\r\n                \"code_string\": \"GB\"\r\n            },\r\n            \"category\": {\r\n                \"@class\": \"DV_CODED_TEXT\",\r\n                \"value\": \"event\",\r\n                \"defining_code\": {\r\n                    \"@class\": \"CODE_PHRASE\",\r\n                    \"terminology_id\": {\r\n                        \"@class\": \"TERMINOLOGY_ID\",\r\n                        \"value\": \"openehr\"\r\n                    },\r\n                    \"code_string\": \"433\"\r\n                }\r\n            },\r\n            \"composer\": {\r\n                \"@class\": \"PARTY_IDENTIFIED\",\r\n                \"name\": \"Dr George Crooks\"\r\n            },\r\n            \"context\": {\r\n                \"@class\": \"EVENT_CONTEXT\",\r\n                \"start_time\": {\r\n                    \"@class\": \"DV_DATE_TIME\",\r\n                    \"value\": \"2015-12-20T00:11:02.518+02:00\"\r\n                },\r\n                \"setting\": {\r\n                    \"@class\": \"DV_CODED_TEXT\",\r\n                    \"value\": \"other care\",\r\n                    \"defining_code\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"openehr\"\r\n                        },\r\n                        \"code_string\": \"238\"\r\n                    }\r\n                },\r\n                \"health_care_facility\": {\r\n                    \"@class\": \"PARTY_IDENTIFIED\",\r\n                    \"external_ref\": {\r\n                        \"@class\": \"PARTY_REF\",\r\n                        \"id\": {\r\n                            \"@class\": \"GENERIC_ID\",\r\n                            \"value\": \"999999-345\",\r\n                            \"scheme\": \"2.16.840.1.113883.2.1.4.3\"\r\n                        },\r\n                        \"namespace\": \"NHS-UK\",\r\n                        \"type\": \"PARTY\"\r\n                    },\r\n                    \"name\": \"Ripple junction DGH\"\r\n                }\r\n            },\r\n            \"content\": [{\r\n                \"@class\": \"SECTION\",\r\n                \"name\": {\r\n                    \"@class\": \"DV_TEXT\",\r\n                    \"value\": \"Allergies and adverse reactions\"\r\n                },\r\n                \"archetype_details\": {\r\n                    \"@class\": \"ARCHETYPED\",\r\n                    \"archetype_id\": {\r\n                        \"@class\": \"ARCHETYPE_ID\",\r\n                        \"value\": \"openEHR-EHR-SECTION.allergies_adverse_reactions_rcp.v1\"\r\n                    },\r\n                    \"rm_version\": \"1.0.1\"\r\n                },\r\n                \"archetype_node_id\": \"openEHR-EHR-SECTION.allergies_adverse_reactions_rcp.v1\",\r\n                \"items\": [{\r\n                    \"@class\": \"EVALUATION\",\r\n                    \"name\": {\r\n                        \"@class\": \"DV_TEXT\",\r\n                        \"value\": \"Adverse reaction risk\"\r\n                    },\r\n                    \"archetype_details\": {\r\n                        \"@class\": \"ARCHETYPED\",\r\n                        \"archetype_id\": {\r\n                            \"@class\": \"ARCHETYPE_ID\",\r\n                            \"value\": \"openEHR-EHR-EVALUATION.adverse_reaction_risk.v1\"\r\n                        },\r\n                        \"rm_version\": \"1.0.1\"\r\n                    },\r\n                    \"archetype_node_id\": \"openEHR-EHR-EVALUATION.adverse_reaction_risk.v1\",\r\n                    \"language\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"ISO_639-1\"\r\n                        },\r\n                        \"code_string\": \"en\"\r\n                    },\r\n                    \"encoding\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"IANA_character-sets\"\r\n                        },\r\n                        \"code_string\": \"UTF-8\"\r\n                    },\r\n                    \"subject\": {\r\n                        \"@class\": \"PARTY_SELF\"\r\n                    },\r\n                    \"data\": {\r\n                        \"@class\": \"ITEM_TREE\",\r\n                        \"name\": {\r\n                            \"@class\": \"DV_TEXT\",\r\n                            \"value\": \"Tree\"\r\n                        },\r\n                        \"archetype_node_id\": \"at0001\",\r\n                        \"items\": [{\r\n                            \"@class\": \"ELEMENT\",\r\n                            \"name\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Causative agent\"\r\n                            },\r\n                            \"archetype_node_id\": \"at0002\",\r\n                            \"value\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Grass pollen allergy\"\r\n                            }\r\n                        }, {\r\n                            \"@class\": \"CLUSTER\",\r\n                            \"name\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Reaction details\"\r\n                            },\r\n                            \"archetype_node_id\": \"at0009\",\r\n                            \"items\": [{\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Manifestation\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0011\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"sneezing\"\r\n                                }\r\n                            }, {\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Comment\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0032\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"only in spring\"\r\n                                }\r\n                            }]\r\n                        }]\r\n                    }\r\n                }]\r\n            }]\r\n        }\r\n    }, {\r\n        \"data\": {\r\n            \"@class\": \"COMPOSITION\",\r\n            \"name\": {\r\n                \"@class\": \"DV_TEXT\",\r\n                \"value\": \"Adverse reaction list\"\r\n            },\r\n            \"uid\": {\r\n                \"@class\": \"OBJECT_VERSION_ID\",\r\n                \"value\": \"f3c55ce4-9fcc-4bad-b772-4293242fd233::hcbox.oprn.ehrscape.com::1\"\r\n            },\r\n            \"archetype_details\": {\r\n                \"@class\": \"ARCHETYPED\",\r\n                \"archetype_id\": {\r\n                    \"@class\": \"ARCHETYPE_ID\",\r\n                    \"value\": \"openEHR-EHR-COMPOSITION.adverse_reaction_list.v1\"\r\n                },\r\n                \"template_id\": {\r\n                    \"@class\": \"TEMPLATE_ID\",\r\n                    \"value\": \"IDCR - Adverse Reaction List.v1\"\r\n                },\r\n                \"rm_version\": \"1.0.1\"\r\n            },\r\n            \"archetype_node_id\": \"openEHR-EHR-COMPOSITION.adverse_reaction_list.v1\",\r\n            \"language\": {\r\n                \"@class\": \"CODE_PHRASE\",\r\n                \"terminology_id\": {\r\n                    \"@class\": \"TERMINOLOGY_ID\",\r\n                    \"value\": \"ISO_639-1\"\r\n                },\r\n                \"code_string\": \"en\"\r\n            },\r\n            \"territory\": {\r\n                \"@class\": \"CODE_PHRASE\",\r\n                \"terminology_id\": {\r\n                    \"@class\": \"TERMINOLOGY_ID\",\r\n                    \"value\": \"ISO_3166-1\"\r\n                },\r\n                \"code_string\": \"GB\"\r\n            },\r\n            \"category\": {\r\n                \"@class\": \"DV_CODED_TEXT\",\r\n                \"value\": \"event\",\r\n                \"defining_code\": {\r\n                    \"@class\": \"CODE_PHRASE\",\r\n                    \"terminology_id\": {\r\n                        \"@class\": \"TERMINOLOGY_ID\",\r\n                        \"value\": \"openehr\"\r\n                    },\r\n                    \"code_string\": \"433\"\r\n                }\r\n            },\r\n            \"composer\": {\r\n                \"@class\": \"PARTY_IDENTIFIED\",\r\n                \"name\": \"Dr George Crooks\"\r\n            },\r\n            \"context\": {\r\n                \"@class\": \"EVENT_CONTEXT\",\r\n                \"start_time\": {\r\n                    \"@class\": \"DV_DATE_TIME\",\r\n                    \"value\": \"2015-12-20T00:11:02.518+02:00\"\r\n                },\r\n                \"setting\": {\r\n                    \"@class\": \"DV_CODED_TEXT\",\r\n                    \"value\": \"other care\",\r\n                    \"defining_code\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"openehr\"\r\n                        },\r\n                        \"code_string\": \"238\"\r\n                    }\r\n                },\r\n                \"health_care_facility\": {\r\n                    \"@class\": \"PARTY_IDENTIFIED\",\r\n                    \"external_ref\": {\r\n                        \"@class\": \"PARTY_REF\",\r\n                        \"id\": {\r\n                            \"@class\": \"GENERIC_ID\",\r\n                            \"value\": \"999999-345\",\r\n                            \"scheme\": \"2.16.840.1.113883.2.1.4.3\"\r\n                        },\r\n                        \"namespace\": \"NHS-UK\",\r\n                        \"type\": \"PARTY\"\r\n                    },\r\n                    \"name\": \"Ripple junction DGH\"\r\n                }\r\n            },\r\n            \"content\": [{\r\n                \"@class\": \"SECTION\",\r\n                \"name\": {\r\n                    \"@class\": \"DV_TEXT\",\r\n                    \"value\": \"Allergies and adverse reactions\"\r\n                },\r\n                \"archetype_details\": {\r\n                    \"@class\": \"ARCHETYPED\",\r\n                    \"archetype_id\": {\r\n                        \"@class\": \"ARCHETYPE_ID\",\r\n                        \"value\": \"openEHR-EHR-SECTION.allergies_adverse_reactions_rcp.v1\"\r\n                    },\r\n                    \"rm_version\": \"1.0.1\"\r\n                },\r\n                \"archetype_node_id\": \"openEHR-EHR-SECTION.allergies_adverse_reactions_rcp.v1\",\r\n                \"items\": [{\r\n                    \"@class\": \"EVALUATION\",\r\n                    \"name\": {\r\n                        \"@class\": \"DV_TEXT\",\r\n                        \"value\": \"Adverse reaction risk\"\r\n                    },\r\n                    \"archetype_details\": {\r\n                        \"@class\": \"ARCHETYPED\",\r\n                        \"archetype_id\": {\r\n                            \"@class\": \"ARCHETYPE_ID\",\r\n                            \"value\": \"openEHR-EHR-EVALUATION.adverse_reaction_risk.v1\"\r\n                        },\r\n                        \"rm_version\": \"1.0.1\"\r\n                    },\r\n                    \"archetype_node_id\": \"openEHR-EHR-EVALUATION.adverse_reaction_risk.v1\",\r\n                    \"language\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"ISO_639-1\"\r\n                        },\r\n                        \"code_string\": \"en\"\r\n                    },\r\n                    \"encoding\": {\r\n                        \"@class\": \"CODE_PHRASE\",\r\n                        \"terminology_id\": {\r\n                            \"@class\": \"TERMINOLOGY_ID\",\r\n                            \"value\": \"IANA_character-sets\"\r\n                        },\r\n                        \"code_string\": \"UTF-8\"\r\n                    },\r\n                    \"subject\": {\r\n                        \"@class\": \"PARTY_SELF\"\r\n                    },\r\n                    \"data\": {\r\n                        \"@class\": \"ITEM_TREE\",\r\n                        \"name\": {\r\n                            \"@class\": \"DV_TEXT\",\r\n                            \"value\": \"Tree\"\r\n                        },\r\n                        \"archetype_node_id\": \"at0001\",\r\n                        \"items\": [{\r\n                            \"@class\": \"ELEMENT\",\r\n                            \"name\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Causative agent\"\r\n                            },\r\n                            \"archetype_node_id\": \"at0002\",\r\n                            \"value\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Grass pollen allergy\"\r\n                            }\r\n                        }, {\r\n                            \"@class\": \"CLUSTER\",\r\n                            \"name\": {\r\n                                \"@class\": \"DV_TEXT\",\r\n                                \"value\": \"Reaction details\"\r\n                            },\r\n                            \"archetype_node_id\": \"at0009\",\r\n                            \"items\": [{\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Manifestation\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0011\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"sneezing\"\r\n                                }\r\n                            }, {\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Manifestation #2\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0011\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"conjunctivitis\"\r\n                                }\r\n                            }, {\r\n                                \"@class\": \"ELEMENT\",\r\n                                \"name\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"Comment\"\r\n                                },\r\n                                \"archetype_node_id\": \"at0032\",\r\n                                \"value\": {\r\n                                    \"@class\": \"DV_TEXT\",\r\n                                    \"value\": \"only in spring\"\r\n                                }\r\n                            }]\r\n                        }]\r\n                    }\r\n                }]\r\n            }]\r\n        }\r\n    }]\r\n}\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ethercis/ethercis/issues/comments/345006522","html_url":"https://github.com/ethercis/ethercis/issues/73#issuecomment-345006522","issue_url":"https://api.github.com/repos/ethercis/ethercis/issues/73","id":345006522,"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-11-16T18:00:25Z","updated_at":"2017-11-16T18:00:25Z","author_association":"NONE","body":"Hi Christian,\r\n\r\nThe '@class stuff', is as you know, important in some nodes where the class cannot be determined at run-time, or where e.g a text node is sub-classed to coded_text. So 'clean' fine but not 'too clean' :)  You should raise this issue with the openEHR SPEC group. There is definitely a need for the full canonical RAW JSON, and that has been signed off as always carrying the class designator but I can see a good argument for having 'lite'version but we want to make that universal too.\r\n "}}
{"actor":{"display_login":"freshehr"}}