ADL reading

Hello guys,

i’m trying to build a app using arquetypes and i need to read the ADL to build my interface.

where i can get some examples how reading ADL 1.5? Is there some API to do that?

thanks in advance,

Márcio Costa
B.Sc. in Computer Science @ Cin/UFPE
M.Sc. Candidate in Computer Science @ CIn/UFPE
MSN: mdckoury@gmail.com

Hello Marcio

Perhaps the quickest route to do this would be to use the java reference
implementation (http://www.openehr.org/projects/java.html) and more
specifically the classes ADLParser and Archetype. Essentially, you
create a new ADLParser object passing as a parameter a standard file
object pointing to your ADL file and then from the parser you can obtain
an Archetype object using the parse() member function.

//For a (minimal) example
File fd;
ADLParser theParser;
Archetype MyArchetype;

fd = new File("openEHR-EHR-OBSERVATION.blood_pressure.v1.adl");
theParser = new ADLParser(fd);
MyArchetype = theParser.parse();
//--------------------------------------------------------------
// It omits some exception handling but this is the main idea

You can now traverse the archetype structure implied by your .adl file
using the functions of Archetype such as getAdlVersion(),
getConceptName(), getChildren() and others.

You could also use the Clinical Knowledge Manager
(http://openehr.org/knowledge/) to browse archetypes of interest and
download them in XML (rather than ADL). From there you could possibly
process the XML to recover anything you want (concepts, terms, labels etc).

The code from the opereffa project
(http://opereffa.chime.ucl.ac.uk/introduction.jsf) might also be helpful
for you, depending on what exactly you are trying to do (Web app in
Java, deployed over Tomcat).

That one is very detailed in that it includes all the necessary (and
extensive) work that is required to handle Archetype(able) information
through the current reference implementation and the Data Access Objects
"mechanism". If my memory is not failing me, it also includes an actual
user interface generator so that forms accepting data are constructed
through the archetypes.

I hope this helps.

All the best
Athanasios Anastasiou

Hello Athanasios ,

your information helped me a lot! I was a little bit lost in the world of openEHR. Now i know how to start my journey!

Thanks you very much!

Best Regards,

Márcio Costa
B.Sc. in Computer Science @ Cin/UFPE
M.Sc. Candidate in Computer Science @ CIn/UFPE
MSN: mdckoury@gmail.com

2012/1/26 Athanasios Anastasiou <athanasios.anastasiou@plymouth.ac.uk>

Hi Marciio,

You should also look at

http://code.google.com/p/open-ehr-gen-framework/

The author Pablo Pazos is on this list and will no doubt have how own
suggestions.

Do not despair - openEHR confusion is a normal pre-requisite to
eventual enlightenment :slight_smile:

Ian
Dr Ian McNicoll
office +44 (0)1536 414 994
fax +44 (0)1536 516317
mobile +44 (0)775 209 7859
skype ianmcnicoll
ian.mcnicoll@oceaninformatics.com

Clinical Modelling Consultant, Ocean Informatics, UK
Director/Clinical Knowledge Editor openEHR Foundation www.openehr.org/knowledge
Honorary Senior Research Associate, CHIME, UCL
SCIMP Working Group, NHS Scotland
BCS Primary Health Care www.phcsg.org

Just one note of caution - the Java project is in the middle of upgrading to ADL/AOM 1.5 from 1.4. So the operational code that is there today is for ADL 1.4. If you are just getting started, the differences probably won’t matter for a while. If you specifically want to see ADL 1.5, you can use the ADL Workbench. This is written in Eiffel, which is probably not a language you are familiar with, but the tool, and test archetypes will help you understand ADL 1.5, along with this wiki page. In a few months the Java code base will catch up, so ADL 1.5 in Java won’t be that far away.

  • thomas
(attachments)

OceanInformaticsl.JPG

I would like to thank all for the attention and help.

Best Regards,

Márcio Costa
B.Sc. in Computer Science @ Cin/UFPE
M.Sc. Candidate in Computer Science @ CIn/UFPE
MSN: mdckoury@gmail.com

2012/1/26 Thomas Beale <thomas.beale@oceaninformatics.com>

Hi Márcio,

As Ian mentioned, we have developed an EHR tool based on openEHR.
The EHRGen has a component to load and cache archetypes on memory, that has the code Athanasios mentioned, you can see it here: http://code.google.com/p/open-ehr-gen-framework/source/browse/trunk/open-ehr-gen/src/groovy/archetype_repository/ArchetypeManager.groovy

See method getArchetype(archetypId).

We use the Java Ref Impl to parse ADL files.

Hope that helps.

Márcio,

We have some academic projects developed at UFMG / Brazil involving the use of ADL. Please, feel free to contact us directly if you have interest.

Regards,

Marcelo Rodrigues dos Santos
UFMG/FUMEC

Excelent Pablo!

I will study the class that you developed.

Thanks,

Márcio Costa
B.Sc. in Computer Science @ Cin/UFPE
M.Sc. Candidate in Computer Science @ CIn/UFPE
MSN: mdckoury@gmail.com

2012/1/26 pablo pazos <pazospablo@hotmail.com>

Greetings,
You may find this one helpful: http://serefarikan.com/2010/10/18/openehr-for-practical-people/
Warning in advance: I moved this from my old server to wordpress and it has some garbage, diagrams are missing etc. It may not be accurate enough too. So why do I even bother to give the link? It would still help with the basics.

Pablo’s work is probably in better shape compared to Opereffa, (I’ll re-write all of it from scratch in the next month or so) so Pablo’s work may help you better as a starting point. Also check out Shinji’s recent posts; he recently released a big update to his implementation in Ruby.

Don’t panic. openEHR is a great piece of work, but it will take time to digest, so don’t feel down if you struggle at first. As you can see, it has a good community.

2012/1/26 Márcio Costa <mdckoury@gmail.com>

Hello Seref,

I’m really impressed with the activity and dynamism of this community.

OpenEHR is a great work, and also need a great time to digest :slight_smile:

Thank you for help :slight_smile:

Best Regards,

Márcio Costa
B.Sc. in Computer Science @ Cin/UFPE
M.Sc. Candidate in Computer Science @ CIn/UFPE
MSN: mdckoury@gmail.com

2012/1/26 Seref Arikan <serefarikan@kurumsalteknoloji.com>

Hello guys,

after reading the majority of the docs, i tryed to write a very simple app that:

  1. Parse a ADL file to AOM
  2. Try to build a Imput Form from respective AOM

I’m with problems to find some references of how to use the Tree that the Parser gives to me.

Is there some reference for the methods, or examples how to use the output of the Parser to build a Interface?

If someone have a simple class, it would be very nice for me since i’m getting started :slight_smile:

Thanks in advance,

Márcio Costa
B.Sc. in Computer Science @ Cin/UFPE
M.Sc. Candidate in Computer Science @ CIn/UFPE
MSN: mdckoury@gmail.com

Hi Márcio,

The EHRGen tool does just that: goes through a template with several archetypes and generate an user interface (HTML)
http://code.google.com/p/open-ehr-gen-framework/source/browse/trunk/open-ehr-gen/grails-app/views/guiGen/create/_generarCreate.gsp

Docs and downloads:
http://code.google.com/p/open-ehr-gen-framework/w/list
http://code.google.com/p/open-ehr-gen-framework/downloads/list

Hello Marcio

(In the mean time, Pablo Pazos did provide a reply, so i must say that
my response applies more generally to openEHR)

Allow me to remind you that, it all depends on what you are trying to do
(and what sort of resource or time constraints you have).

At this point, i would strongly recommend that you very carefully read,
at least once, the complete "Architecture Overview" document, so that
you understand what openEHR is about and how do the individual building
blocks fit together.

The data structures can (and usually will) get very complex, so having
the bigger picture in mind first helps immensely.

After this, you can move to the "Archetype Model" documents (this is
where you will find answers to questions regarding the structure of the
"Archetype" class) and eventually, the "Reference Model" documents.

The Reference Model will be very important when the time comes for you
to create actual computable representations according to the "blue
print" that the "Archetype" class specifies.

In other words, the "Archetype" that you might have at hand at the
moment, is only a description of a data structure...You can NOT do
something like:

MyArchetype.SomeField = "Some String Value"

...on the Archetype class, you will have to obtain an RMObject (through
the "RMObjectBuilder") and work on that one.

(It is not simply a matter of having "the right class" that someone
might have put together...Almost everything you will need in terms of
code, at least at introductory level, is available through the "java
reference implementation" project.)

I hope this helps.

All the best
Athanasios Anastasiou

Now you need to join the java list :wink:

Hello again

I am sorry but i forgot to include the link to all the documents i am
referring to my earlier message :-/

Here it is:
http://www.openehr.org/svn/specification/TRUNK/publishing/roadmap.html

All the best
Athanasios Anastasiou