concerning adl-parser

LinkEHR writes an archetypenode id in a use_node, the Java ADL-parser regards this as erroneous, although it is permitted in the AOM, where there is an nodeId in the ArchetypeInternalRef constructor.

The repair in adl.jj was, however simply to do. I tested it with all available testfiles, and also with adding an nodeId in the adl-test-entry.archetype_internal_ref.test-arc hetype, like this:

attribute3 matches {
             use_node SECTION /items[at0001]
             use_node SECTION /items[at0002]
         }
         attribute4 matches {
             use_node SECTION[at0005] /items[at0001]
             use_node SECTION[at0006] /items[at0002]
         }

I copied the needed code-change down below:

ArchetypeInternalRef archetype_internal_ref(String path, CAttribute parent) :
{
   String type;
   Interval<Integer> occurrences = new Interval<Integer>(1, 1);
   String target;
   String nodeID = null;
}
{
   <SYM_USE_NODE> type = type_identifier()
    [ nodeID = constraint_ref() ]
    [ occurrences = c_occurrences() ]
   target = absolute_path()
   {
       return new ArchetypeInternalRef(path, type, occurrences, nodeID, parent,
               target);
   }
}

Hi Bert,

As you say, we support node identifiers at internal reference node to make ADL consistent to what the AOM specifications say. That was informed to the lists back in February 2009: http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/2009-February/004361.html

We also removed the “units” keyword from ADL parser long time ago as you did :slight_smile:

David

Hi David, Very funny, so I did it too. I did not remember your message from almost 5 years ago :slight_smile: In Holland we have a saying: “Having a job is one thing, but keeping a job is another thing” So we, in this community are sometimes busy reinventing the wheel. I checked it in github, the reparations are still not in there. But OK, my local version is repaired. Now something else, for lobbying for the good things: Diego promised yesterday, he would very soon update the LinkEHR lite version. I hope he will also post a 64-bit Linux-version, which will help me really a lot. I can then finally use it on my daily workstation. Which will be a great relieve. Thanks, and have a nice day Bert

Hi Bert,
Could you do a pull request on github with these changes?
It's much easier for us to keep up with the modifications that way.
Thank you.

Cheers,

iago

Hi Iago,

Of course I can, I will do it later to day.

Do you want a new branch, or just in the master-branch?

Bert

Master should be fine.

Thanks,

iago