openehr / adl2-core Goto Github PK
View Code? Open in Web Editor NEWADL / AOM 2 (previously known as '1.5') core libs and parser
License: GNU Affero General Public License v3.0
ADL / AOM 2 (previously known as '1.5') core libs and parser
License: GNU Affero General Public License v3.0
There is a problem with merge of parent-child archetype. This is related to element with CHOICE.
One example is the two archetypes:
openEHR-EHR-CLUSTER.amount.v1
openEHR-EHR-CLUSTER.amount-range.v1
I think the problem is related to the following method in org.openehr.adl.flattener.ArchetypeMerger:
...
@nullable
private CObject findSpecializedConstraintOfParentNode
...
I found a solution for the archetypes above, but that introduced failure on other tests. The proposed fix was to check for both nodeId and rmTypeName.
I am still looking on this.
Sorry for asking a question in probably improper place.
In the openehr/java-libs project (related to ADL 1.4 and OET) written by Rong Chen I see the SkeletonGenerator class. Do you have something similar for ADL 2?
I installed the project with maven and then I load libraries to a new simple project which I am trying to compile.
(https://cloud.githubusercontent.com/assets/6311636/10074405/686a4dcc-62d8-11e5-9130-c6e84e242cae.jpg)
Then, I read the manual
(https://cloud.githubusercontent.com/assets/6311636/10074413/7e53fcd2-62d8-11e5-8dc6-749bdd9eb875.jpg)
and I am trying to create a very simple project, so:
(https://cloud.githubusercontent.com/assets/6311636/10074435/91139a3a-62d8-11e5-9894-9df379356e60.jpg)
Then I understood that new AdlDeserializer(new OpenEhrRmModel()); creates the error and I do:
(https://cloud.githubusercontent.com/assets/6311636/10074441/a0e11398-62d8-11e5-8440-233be31c5215.jpg)
but I still have error on running this simple project.
Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/v4/runtime/CharStream
at main.main(main.java:10)
Caused by: java.lang.ClassNotFoundException: org.antlr.v4.runtime.CharStream
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 1 more
Is it easy to give me instruction on how to use this adl parser and what am I doing wrong?
Thank you very much,
I am not sure what is correct with this.
I trying to serialize the Blood Pressure archetype which has an Interval Event.
INTERVAL_EVENT[at1042]
....
width matches {
DV_DURATION matches {
value matches {|PT24H|}
}
}
This is what gets generated:
width matches {
DV_DURATION matches {
value matches {[PT24H,PT24H]}
}
}
The generation of the text {[PT24H,PT24H]} is done in org.openehr.adl.am.mixin.IntervalMixin.
Is this a bug in the IntervalMixin or should the DV_DURATION be treated different in this case?
I am not sure
It seems some of the newer description info is not being parsed such as ip_acknowledgements, custodian_namespace, etc...
I could be a good idea to use some kind of CI tools, TravisCI for example.
It's free for public repositories and can run the tests for all pull requests and pushes to the repository.
Hi
Thanks for the great project.
I just started to look at it. I have done two things:
The test that failed is:
org.openehr.adl.flattener.OperationalTemplateBuilderTest#testOntologyMerge
The problem is that the order of ComponentOntologies is wrong. The original test is:
assertThat(template.getComponentOntologies().get(0).getArchetypeId()).isEqualTo("openEHR-EHR-COMPOSITION.root_use_archetype.v1");
assertThat(template.getComponentOntologies().get(1).getArchetypeId()).isEqualTo("openEHR-EHR-EVALUATION.alert.v1");
This failes.
But if I change order (like below) the test is ok:
assertThat(template.getComponentOntologies().get(1).getArchetypeId()).isEqualTo("openEHR-EHR-COMPOSITION.root_use_archetype.v1");
assertThat(template.getComponentOntologies().get(0).getArchetypeId()).isEqualTo("openEHR-EHR-EVALUATION.alert.v1");
I will do some more testing to see how this happens.
PS!
The laptop it fails on is Windows 7 and my JDK is :
Bjørn
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.