# openEHR and terminology servers **Category:** [Technical (archive)](https://discourse.openehr.org/c/technical-archive/156) **Created:** 2016-12-02 08:50 UTC **Views:** 15 **Replies:** 28 **URL:** https://discourse.openehr.org/t/openehr-and-terminology-servers/15464 --- ## Post #1 by @Daniel_Karlsson Dear All, while thinking about terminology server requirements for openEHR systems I would like to ask all openEHR implementers about experiences of different solutions\. Are there any experiences of using openEHR systems with e\.g\. the FHIR terminology services, CTS2, Ocean TQL, homebrew, etc? What are the use cases when the terminology servers are used \(e\.g\. design time, data entry, querying, etc\.\)? What are the "terminological queries" that are used/needed \(e\.g\. subsumption testing, subset membership, subset expansion, etc\.\)? Thanks, Daniel --- ## Post #2 by @grahamegrieve hi Daniel I'll listen to this discussion with interest. I expect that the answer will be: same functional needs as already covered by FHIR terminology services, but there's some additional information features that are needed to enable seamless integration. Grahame --- ## Post #3 by @Daniel_Karlsson Hi All, so I'll start: At Linköping University we did a demonstrator in 2012 using a homebrew REST interface to an expression repository based on the SNOMED CT query language at the time. The demonstrator showed querying over EHR content including both AQL and the SNOMED CT query language. The terminology server per default did expansion of results of the SNOMED CT queries, i.e. it returned a set of SCTID:s+expression id:s. The aim of this experiment was to show that some very complex quality indicators could be expressed as queries on a structured health record. /Daniel --- ## Post #4 by @system Hi Daniel, Did your team publish any articles about the demonstration? I'm interested in the technical aspects of querying expansion of results. Thanks! --- ## Post #5 by @system A Rest service for terminology needs to be defined per terminology, because they are all of different features\. There is one good source of inspiration for a SNOMED terminology\. https://dev-term.ihtsdotools.org/snowowl/snomed-ct/v2/ I say, source of inspiration, because not everybody needs editing capacity, most use\-cases just want to query\. And the swagger/openapi is not optimal, there are some errors in the data\-models on technical level, but these are very few\. When you look at it, and leave out all the branch\-things \(which are for editing and versioning\), then you have a decent interface for a SNOMED service\. An then, it is also very obvious \(afterwards\) and it reflects good thinking in its simplicity\. As you may know, there are mappings for SNOMED and LOINC, ICDxx and other terminologies \(also local\), and others, on the way, or already finished, so this interface can also used for these mappings which gives in this way a route to query other terminologies\. good luck Bert Verhees --- ## Post #6 by @system Hi Danial, Very timely questions for us at Operon \- we are working with terminology service providers to provide tight integration with openEHR services\. We definitely need to be able to expand valuesets in the context of an openEHR query e\.g Give me any patients with a problem/diagnosis of diabetes mellitus type 2 or children\. i\.e is\_a relationships We need to be able to channel this via AQL or other opeNEHR query languages\. We need to be able to manage and query over termsets/resultsets\. I'm not so sure about the need for more complex queries over other relationships / SNOMED concept model right now\. We definitely need some sort of vendor\-agnostic API against which the majority of terminlogy service calls can be run\. The FHIR service looks 'good enough' to me although I don't pretend to be an expert\. Ian Dr Ian McNicoll mobile \+44 \(0\)775 209 7859 office \+44 \(0\)1536 414994 skype: ianmcnicoll email: ian@freshehr\.com twitter: @ianmcnicoll Co\-Chair, openEHR Foundation ian\.mcnicoll@openehr\.org Director, freshEHR Clinical Informatics Ltd\. Director, HANDIHealth CIC Hon\. Senior Research Associate, CHIME, UCL --- ## Post #7 by @system > e.g Give me any patients with a problem/diagnosis of diabetes mellitus --- ## Post #8 by @system As a matter of fact, I am building such an archetype editor as a hobby project, just for fun. Bert --- ## Post #9 by @Daniel_Karlsson Hi Pablo, unfortunately that didn't happen, at least until now. Technically, the system used a relational database to persist SNOMED CT and expression versions over time and an OWL ontology of SNOMED CT and expressions and the two were kept in sync. Expansion was just a query of the the transitive closure table. /Daniel --- ## Post #10 by @yampeku Hi Daniel, We have been working on this from several perspectives\. We have been mostly focused in providing terminology binding support for archetypes, and first efforts were focused in providing term and subset bindings via external terminology services \(such as ITServer\) Lately we have implemented a Snomed expression syntax engine \(for both parsing and executing\) called SNQuery \(http://snquery.veratech.es\) and we are using it instead, as provides more flexibility\. Having Snomed expression syntax queries as value bindings in archetypes allows to easily create queries for data validation \("this code should be an allergy" or "the text of this coded text should be one of the synonyms of the code"\) and data transformation \(to have conditional data transformation functions such as "if the diagnosis is a cancer diagnosis then A else B"\)\. We mostly use subset membership queries, but I assume that subsumption testing will be handy in archetype specialization definition \(subsets in the specialized archetypes must be a subset of the ones in the parent archetype\)\. Regards --- ## Post #11 by @system Hi Diego, your link does not work\. But I am replying for another reason\. I think that subsumption testing in archetypes is not feasible when the archetypes are not covered by SNOMED\. This is because SNOMED subsumption testing is only valid inside the SNOMED definitions\. The system of specialized archetypes and parent archetypes \(without the use of SNOMED\) is a parallel system in its own semantic world, which cannot be mixed with the SNOMED semantics, so there will be no automatic subsumption testing\. OpenEHR will need to implement SNOMED if you want to do what Ian proposed as an example:/ "e\.g Give me any patients with a problem/diagnosis of diabetes mellitus type 2 or children\. i\.e is\_a relationships"/ When you want to use advantages of SNOMED, you must not mix up a parallel world to SNOMED with SNOMED\. This could lead to dangerous situations\. Bert --- ## Post #12 by @yampeku Hi Bert, I talked about specializations because one of the basis of it is that constraints in specialized archetypes must be included in the parent constraints\. e\.g\. parent archetype contains the "any allergy" subset and the children archetype contains "all allergies caused by a drug", and for that specialization to be correct, the second should be a subset of the first one\. If you refer to label binding then I completely agree with you, bindings to snomed labels are difficult or almost impossible to define \(I think that probably the only safe way of doing this is that the country asks for an extension to snomed based on their national archetypes and then binds the labels to the new codes\) Regards --- ## Post #13 by @yampeku Oh, and if the above link fails you can try the mirror http://diebosto2.pc.upv.es:8888/SnomedQuery/ --- ## Post #14 by @system That doesn't work either, maybe it is a country thing? --- ## Post #15 by @system That is what I mean with the parallel semantic world\. In your archetypes, you create in this way a semantic world that has no trust\-able semantic connection to the SNOMED semantic world\. Maybe there is compatibility, but we can never be sure about it\. In fact, working this way is creating many semantic worlds \(for every institution which creates archetypes sets\), a situation which we are for twenty years very busy with, to avoid\. If we want to be sure that we are talking about the same thing, we need a common reference, and SNOMED is a good example for how a common reference can look like\. I would not know a better one\. Why SNOMED is so suitable to be a good reference, is because SNOMED defines into many details, which are common ground for the member states\. We can be sure what SNOMED means when it talks about "allergy for drug", because we agree to the very extensive semantic world of which this statement is a part\. Bert --- ## Post #16 by @yampeku I believe there are no country restrictions --- ## Post #17 by @system Hi Diego, I'm just like Bert from the Netherlands, and it seems to have something to do with the locale nl that our browser sends to your server but that your server has not available? This is my error message: **type** Informe de Excepción **mensaje** com.vaadin.server.ServiceException: java.util.MissingResourceException: Can't find bundle for base name com.example.snomedquery.messages_nl, locale es_ES **descripción** El servidor encontró un error interno que hizo que no pudiera rellenar este requerimiento. **excepción** ``` javax.servlet.ServletException: com.vaadin.server.ServiceException: java.util.MissingResourceException: Can't find bundle for base name com.example.snomedquery.messages_nl, locale es_ES com.vaadin.server.VaadinServlet.service(VaadinServlet.java:367) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ``` **causa raíz** ``` com.vaadin.server.ServiceException: java.util.MissingResourceException: Can't find bundle for base name com.example.snomedquery.messages_nl, locale es_ES com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1469) com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1426) com.vaadin.server.VaadinServlet.service(VaadinServlet.java:365) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ``` **causa raíz** ``` java.util.MissingResourceException: Can't find bundle for base name com.example.snomedquery.messages_nl, locale es_ES java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564) java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387) java.util.ResourceBundle.getBundle(ResourceBundle.java:773) com.example.snomedquery.Messages.getString(Messages.java:19) com.example.snomedquery.StartView.OpcionesApp(StartView.java:588) com.example.snomedquery.StartView.(StartView.java:175) com.example.snomedquery.SnomedqueryUI.init(SnomedqueryUI.java:65) com.vaadin.ui.UI.doInit(UI.java:687) com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:214) com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74) com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1414) com.vaadin.server.VaadinServlet.service(VaadinServlet.java:365) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ``` **nota** La traza completa de la causa de este error se encuentra en los archivos de diario de Apache Tomcat/[8.0.26.](http://8.0.26.) --- ## Post #18 by @system Works for me \(currently in Netherlands\)\. Ian Dr Ian McNicoll mobile \+44 \(0\)775 209 7859 office \+44 \(0\)1536 414994 skype: ianmcnicoll email: ian@freshehr\.com twitter: @ianmcnicoll Co\-Chair, openEHR Foundation ian\.mcnicoll@openehr\.org Director, freshEHR Clinical Informatics Ltd\. Director, HANDIHealth CIC Hon\. Senior Research Associate, CHIME, UCL --- ## Post #19 by @yampeku Seems like that is the problem We'll have a look into it :) --- ## Post #20 by @system Hi there, same issues here. Cheers, Birger --- ## Post #21 by @system Works fine in Firefox, does not work in Chrome, both in Linux. (maybe that helps analyzing the problem) --- ## Post #22 by @system By the way, looks like a very interesting software, but I must study it better. Is there some documentation also? Bert --- ## Post #23 by @michael.lawley I would argue the FHIR provides such an API\. It also includes the SNOMED Expression Constraint Language \(ECL\) as part of the spec\. This is why we chose it as the basis I for our terminology server, Ontoserver, which is now the basis for Australia's National Clinical Terminology Service \(www\.healthterminologies\.gov\.au\) We also built a little UI to demonstrate use of ECL through FHIR at https://ontoserver.csiro.au/shrimp-fhir/ecl.html click on the help link for a range of simple and more complex query examples\. Michael --- ## Post #24 by @system Seems a problem with language settings/preferences to Dutch in browser. It also appears on Mac. So, some work to do ;-) Bert --- ## Post #25 by @system > Hi Bert, > > Made a change that I believe it should have fixed the issue\. Can you test it? :\) Very nice subsumption testing, I think just as I learned it last year in the implementation course from IHTSDO\. I could check it in detail, but I trust it looks good\. Thanks for sharing Bert --- ## Post #26 by @system Hi Bert, I think the idea of the CTS2 is to define an abstraction layer over many terminologies to have a common way to access them event if they have different features or internal structure. I'm sure others here will know more about it. ref [http://www.omg.org/spec/CTS2/1.2/](http://www.omg.org/spec/CTS2/1.2/) Cheers, Pablo. --- ## Post #27 by @system Hi Pablo, The FHIR terminology service has a similar aim and has been described as "CTS2-lite". It is much more implementer orientated than CTS2 but, of course, lacks many of the aspects directed at the authoring community. Ian --- ## Post #28 by @grahamegrieve yes. that's deliberate. We've always said that the requirements for authoring are outside our scope. But that may change in the version after the one we'll publish in a few months Grahame --- ## Post #29 by @system Thanks Pablo, I never heard about it. A common interface to several terminologies seems useful for implementing a simple access layer . I will read about it later to see how the good intentions reflect in the results Bert --- **Canonical:** https://discourse.openehr.org/t/openehr-and-terminology-servers/15464 **Original content:** https://discourse.openehr.org/t/openehr-and-terminology-servers/15464