How to start

I am a Java developer. I am assigned to develop EHR based on OpenEHR. I read some specifications and they seem very complex to me. For instance, I want to create a web page like:

Last Name:

First Name:

Date of Birth Date:

Gender:

Phone:

Email:

Emergency Contact Person:

How do I map this object to Archetype?

David

Hi Lexis, you can grab the demographic Person archetype here: http://www.openehr.org/ckm/

Then use the ADL Workbench to extract paths, and map those paths with your fields. We call that mapping a “binding” between archetype nodes and software elements/artifacts.

Is there a tutorial book I can purchase or some examples? Step-by-step tutorial is best.

I found ArchetypeSaveLoadExample.java, but I missed a lot of imported libraries. How do I find the source code for this example?

Thanks,

David

Dear Lexis,
A piece of early warning: If someone assigned only you to develop an EHR based on openEHR, assuming that you’ll figure out everything on your own and deliver a solution, they are making a big mistake: this is not a one man job.
Based on your questions, I get the feeling that you have never been exposed to openEHR, and you have a massive amount of learning to do.

Threre is nothing wrong about your goal or being in your position: every once in a while, someone in your position drops by, asks questions, and gets frustrated because he/she can not find what he/she was expecting to find.
If this is not an academic exercise, I strongly suggest that you take a look at the vendors that deliver openEHR based solutions, and discuss your requirements with them. Regarding your “how do I do this?” type of questions,
http://serefarikan.com/2012/11/08/openehr-for-practical-people-cleaned-up/ and http://openehr.codeplex.com/documentation might help get your head around the concepts.

All the best

David, you have to build your own kernel. There is no fully functional kernel in Java available. There are some wheels you have to reinvent. Be careful with advices in the past, they are always/often based on limited experiences, or have some company-politically background. Think for your own, that is the most important advice I can give you. You must think about: - Database-layer, you have to consider the type of database, and then a way to serialize your RM-objects to that database. - You also must consider your infrastructure, how to handle archetypes, how to validate data against the archetypes, how to communicate with GUI’s, etc. - How to have a query-engine which is able to query ADL-paths. (AQL) All this is not available in open source, even good ideas how to do so are not available. There is quite a lot you have to do before you have a working OpenEHR-kernel. So, thinking in terms of displaying data on a website, is something you do not need to do coming months. In fact, that is more or less, the last step. A first step: A good study point to start with is read the Reference Model, and look at the archetypes at: Try to match them, and when you have understood that, than it will become time to think about how to design your kernel. There are many good ways to do so. This list is a good place for advice, especially when you have more specific questions good luck Bert Verhees

Hi,

To create bindings you only need an ADL Parser, and that exists in Java.
Then you build your forms and dayabase the way you know. Just define bindings to GUI form controls and database tables/columns (if you're working qith relational dbs).

You don't need to define a full openEHR based persistence layer for the first implementation, that would take months.

AFAIK There's no such thing as a step by step guide.

For a working open source & java based generic system, take a look at EHRGen Framework, I have another project on github that might help you: CaboLabs EHRServer

I finished http://serefarikan.com/2012/11/08/openehr-for-practical-people-cleaned-up/. It is very intuitive coverage. I understand a flow how to handle medical data. In this article, Seref mentioned there is the second article. I would appreciate it if you can tell me where is the second article.

Thanks,

David

Should I create a new database table to store these fields:

Last Name:
First Name:
Date of Birth Date:
Gender:
Phone:
Email:
Emergency Contact Person:

I get confused about how to save and retrieve data and where data are saved?

Thanks,

David

Is RM-objects only used for data interchanges between different EHR system?

Does “a way to serialize your RM-objects to that database” means that I have to create my own tables to store medical data?

Where can I get a whole picture about how to retrieve data and save data? As I understand OpenEHR is used to model medical data. Am I right?

Thanks,

David

Create tables, saves and retrieves the.same way you do with any other system. This is not black magic, is just data :slight_smile:

But you need to create the bindings.

In 2012 I created bindings and give them to developers of a mobile app for a company in Netherlands (Bert works in that project). The developers only had to understand the bindings, not the whole openEHR paradigm.

Look for oenEHR xml schemas.

May I have some examples? I am starting to understand OpenEHR a little bit.

Thanks,

David

Hi David,

I see you are completely in the dark. Your question in another email shows that quite clear.

I mean this question

Should I create a new database table to store these fields:

Last Name:
First Name:
Date of Birth Date:
Gender:
Phone:
Email:
Emergency Contact Person:

What you need to store are instances of the reference model. That is generic, it does not have fields like you mention. Those fields are defined in archetypes.
That is why I advised you yesterday, take a good look at the reference model. There is a good Java-version of it, written by Rong Chen.
Then take a good look at the archetypes at the CKM: http://www.openehr.org/ckm/
You need to understand the match between them, the documentation must help you. You must understand the documentation also.

However, the documentation is more about the medical meaning of the generic reference model.
But for you, when developing most important is to understand the technical match, that is why the Java-code <--> archetypes match is good for you to understand..

Don't do anything else before you understand this part completely.
You don't need to memorize it all, just understand. Memorizing comes automatically when working with it.
Take your time, give yourself a week or more to do so. That is quite normal amount of time.

When you have good understanding of the match between the Java-reference-model code, the documentation and the archetypes on CKM.

Then come back to this list, and we can discuss how to proceed.

Seref advises against building a kernel on your own, except when you do it for academic exercise.
I disagree with him. I think it is quite doable, but it is not a small thing to do.
But with good help and not being afraid to ask, it can be done, and quite good. But it will take a year or more.
Do you have so much time? You will really need it.

Pablo advises you to use a relational database.
I don't think that is suitable for a good working kernel, because you cannot run path-based queries against it, but for a start it might work.

But at this moment, just understand how the match is between:
archetypes <-\\//-> Rong's Java reference model code <-\\//-> medical data/documentation

Just concentrate on that, the rest will become clear after that. You are doing your first steps on this journey. You need time, much time.

good luck
Bert Verhees

Dear David,

Just because the proposed options both don't seem ideal at first sight, I would like to mention that I made good experiences working with an OWL representation of archetypes [1]. It took around two weeks until I could query my self-generated archetyped patient data. OWL can be queried with SPARQL based on graph patterns.

The example archetypes, patient data and queries are online: http://www.few.vu.nl/~kdr250/archetypes/index.html

However, there are some issues:

1) I stored the data as instances of archetypes, not as instances of the reference model. This seems most intuitive to me, but there might be some implications that I'm unaware of.

2) The ADL2OWL translator (originally developed by Leonardo Lezcano) is not feature-complete yet. For example, terminology bindings are not implemented yet. But Leonardo and me would be happy to share what we have so far, based on an appropriate open source license. It's written in Java.

Best,
Kathrin

[1] http://www.few.vu.nl/~kdr250/publications/KR4HC2012-Semantic-Integration-Archetypes.pdf

That is very interesting, Kathrin,

Do you also have a way to validate the data?

Thanks
Bert

Hi Bert,

The idea is to validate the data by using an integrity constraint validator such as http://clarkparsia.com/pellet/icv/. I just implemented a little proof of concept so far (successfully, a blood pressure value that was out of range). Others have done something similar: http://www.biomedcentral.com/content/pdf/2041-1480-2-2.pdf

Best,
Kathrin

Op 8/8/13 3:33 PM, Bert Verhees schreef:

But I wonder, excuse me if it is an obvious question....
(I must study it, it is a lot of information, and I will depending on these questions)

Is there a way to use the archetype-ADL-code as a source for automagically to a validating source for validating datasets?
Not only the leaf values, that is the easiest part, but also the structure, occurrences, cardinality, illegal properties, etc?

And I have another question also,
I am not educated in graph-pattern, I should have been, but a day only has 24 hours.
Can it be used for automagically translate AQL-queries, is that possible?

Automagically means for me: can there be written software to do so.

Dear Bert,

Those are very good questions, but I'm afraid that they are still open research questions. So just some educated guesses:

I think that occurrences and cardinality should easily be covered by an integrity constraint validator, while structure and illegal properties depend on how the OWL is modelled. By the way, when I read your question, I had to think of work that has been done to validate archetypes themselves, maybe you find that interesting, too: http://ceur-ws.org/Vol-674/Paper150.pdf

I'm also not an expert on AQL queries, but from what I've seen so far they resemble SPARQL a lot, and there has been some work on translating XPath queries into SPARQL. However, I am not sure whether off-the-shelf tools exists, and if not how much work it would be to program it yourself.

If you are completely new to the topic, there is also a short article by Tim Berners-Lee explaining " Why RDF model is different from the XML model": http://www.w3.org/DesignIssues/RDF-XML.html It might be a good starting point for understanding graph patterns!

Best,
Kathrin

Op 8/8/13 4:00 PM, Bert Verhees schreef:

Please specify what kind of examples do you need. For the software part I believe you can do it. The binding is just a mapping of the elements I mentioned on my previous messages, in a simple text file.

Thanks Kathrin

I will read the papers.

best regards
Bert