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);
   }
}

Bert,

Re: the 'units' problem, see my answer previously posted:

Treating "units" etc as keywords is a pretty dirty way to implement dADL (now ODIN) parsing! The property names in a C_DV_QUANTITY (or C_DV_ORDINAL) structure shouldn't be keywords, they are just property names, and should be collected and either compared to the RM or (what I do) converted straight to an object by the dADL (ODIN) deserialiser.

As per my recent post, all of this is now gone in ADL 1.5.

IN any case, I would not expect any problem with picking up "units" in two different parsing contexts in the parser.

- thomas

you might want to consider posting these issues on the Java list, you'll probably get more answers there... not everyone bothers to read all messages on this list if they are busy.

- thomas

(attachments)

oceanfullsmall.jpg
btnliprofileblue80x15.png

Op 02-09-13 16:54, Thomas Beale schreef:

you might want to consider posting these issues on the Java list, you'll probably get more answers there... not everyone bothers to read all messages on this list if they are busy

Thanks Thomas, I forgot there was a Java-list. There hasn't been much traffic on it. (sleeping community, but well done work)

Anyway, I posted it there, so I did my best for the community, there is nothing much more I can do. Changing code in the repository without consent does not seem appropriate, if possible at all.

Bert

there are definitely people working on that - you need to post on the java list, they will tell you whether to do a Git pull request or whether to do something else to contribute.

- thomas