Giter Site home page Giter Site logo

adl2-core's Introduction

adl2-core

ADL / AOM 2 (previously known as '1.5') core libs and parser

Getting Started

Requirements

  • Java 7
  • Maven 3

Usage

The latest stable build is deployed into Maven Central repository. To include adl2 parser into your project, add this dependency into your pom:

<dependency>
    <groupId>org.openehr.adl2-core</groupId>
    <artifactId>adl-parser</artifactId>
    <version>1.2.0</version>
</dependency>

Look into adl-parser directory for some examples about using the parser.

Build from source

Clone the project from github. Then, run:

mvn clean install

This will create jar files in the target directories of each submodule

Deploy to maven central repository

The project uses maven-release-plugin to deploy the artifacts to maven central.

First, make sure that there are no outstanding changes left to be committed, otherwise, the deployment will fail. Also, make sure that mvn clean install completes successfully.

To begin with deployment, run:

mvn release:prepare

This will ask you for the version of the deployed artifacts, name of the created scm tag, and the new development version, all of which will have sensible defaults. It may also ask you for your GitHub credentials. If there were any problems, run mvn release:clean to undo any changes.

Once the release is successfully prepared, you can deploy it with:

mvn release:perform

This will deploy the artifacts in the staging repository of OSS Repository Hosting. For information about releasing the artifacts from the staging repository in maven central, read http://central.sonatype.org/pages/releasing-the-deployment.html.

Short version:

  • Login in https://oss.sonatype.org/
  • Go to Staging Repositories (on left panel) and search for orgopenehr-####.
  • Select this repository, and press Close
  • One the repository is successfully closed, press Release
  • Artifacts should be synhronized to maven central within few minutes

adl2-core's People

Contributors

bjornna avatar markopi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adl2-core's Issues

DV_DURATION on INTERVAL EVENT

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

[Improvement] Continuous Integration

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.

Problem on using this project

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,

OperationalTemplateBuilder fails

Hi
Thanks for the great project.
I just started to look at it. I have done two things:

  1. Imported the project into a Jenkins build server on Linux. It worked fine
  2. Imported the project on my Windows laptop. One test failed.

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 :

  • java version "1.8.0"
  • Java(TM) SE Runtime Environment (build 1.8.0-b132)
  • Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

Bjørn

Problem with ArchetypeMerge on element with choice

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.

Instance generator

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.