ADL syntax problem, the new ADLParser finds a problem that an old version of the ADLParser didnt find.

Hi,

i am not very good at ADL syntax so i am wondering if some of you could help me find whats wrong with the ADL file. The ADL file is from openLinkEHR and they use an old version of the ADLParser. I would like to update the file so the new ADLParser accepts it since i want to use it in my project.

The ADLParser returns the text:
se.acode.openehr.parser.ParseException: Encountered “/” at line 297, column 48.
Was expecting one of:
“}” …
“c_dv_quantity” …
<V_TYPE_IDENTIFIER> …
“use_node” …
<SYM_ALLOW_ARCHETYPE> …
<V_TERMINOLOGY_ID_BLOCK> …
<V_CODE_PHRASE> …
“+” …
“-” …
<V_INTEGER> …
“C_DV_ORDINAL” …
“true” …
“false” …
<V_ISO8601_DATE_CONSTRAINT_PATTERN> …
<V_DATE> …
“|” …
<V_ISO8601_TIME_CONSTRAINT_PATTERN> …
<V_HHMM_TIME> …
<V_HHMMSS_TIME> …
<V_HHMMSSss_TIME> …
<V_HHMMSSZ_TIME> …
<V_HHMMSSssZ_TIME> …
<V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN> …
<V_DATE_TIME> …
<V_DATE_TIME_MS> …
<V_DATE_TIME_Z> …
<V_DATE_TIME_MSZ> …
<V_ISO8601_DURATION_CONSTRAINT_PATTERN> …
<V_ISO8601_DURATION> …
<V_STRING> …
<V_REGEXP> …
“*” …
<V_REAL> …
<V_LOCAL_TERM_CODE_REF> …

Line 297 is:
value matches {/\d{4}((0[1-9]|1[0-2])((0[1-9]|[12]\d|3[01])(T?([01]\d|2[0-3])([0-5]\d([0-5]\d([,.]\d+)?)?)?(Z|(+-(00|30)?))?)?)?)?|\d{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01])(T([01]\d|2[0-3])(:[0-5]\d(:[0-5]\d([,.]\d+)?)?)?(Z|(+-(:(00|30))?))?)?)?)?/}

Cheers,
Filip

(attachments)

ITEM_TREE.adl (46.7 KB)

Hi Filip,

It looks like datetime constraint pattern to me. Try to find some valid pattern from other archetypes and replace this one.

cheers,
Rong

Hi,

What’s openLinkEHR?
I get zero hits for it in google.

Regards

Olof Torgersson

22 okt 2008 kl. 14.06 skrev Filip Klasson:

Hi,

I guess Filip meant LinkEHR, http://www.linkehr.com/ , but I am not completely sure. (It is Daniel and Erik that supervises Filip and Patrik, so I am not involved in their project.)

Regards,

Mikael

Mikael Nyström

Medicinsk informatik

Institutionen för medicinsk teknik

Linköpings universitet

It's probably LinkEHR: www.linkehr.com/

Regards
Sebastian

Olof Torgersson wrote:

Hi,

I am talking about http://www.linkehr.com/ but when you download the source code it is called OpenLinkEHR. Sorry for the confusion.

My problem is that LinkEHR uses an old version of the ADLParser so the RM archetypes passes through it but in the new ADLParser they are not accepted and i am trying to find what the problem is.

Cheers,
Filip

2008/10/23 Olof Torgersson <oloft@chalmers.se>